temporary-containers
temporary-containers copied to clipboard
Temporary containers not removed with new sync feature
- Temporary Containers Version: 1.7
- Firefox Version: 73.0
I've just noticed that with Firefox's new Multi-Account Containers sync feature, temporary containers are being synced across browsers on different machines, and then not removed, even when all instances of the container (e.g., tmp4) are closed in both browsers. Completely closing both browsers and then re-opening doesn't get rid of them either. They can be manually removed, if you manually remove them from both browsers and then sync Firefox, but in my case I have found dozens of temporary containers are being synced and kept, so this is not practical.
I assume it's possible to deactivate the container syncing feature (it asks whether to activate it upon update to the new Multi-Account Containers version), but I actually find it quite useful. So if there is some way to prevent temporary containers from being synced (ideally), or (less ideally) to allow them to still be automatically removed even after they've synced, that would be great.
This is using Automatic Mode, deleting no longer needed temporary containers after the last tab in it closes, and reusing available numbers in settings. Everything else is set to default.
That's unfortunate. I've mentioned this during review of the sync feature, and it was said that it should work. I'll look into it at some point, but it might be worth filing this in the MAC issues as well, since in theory the containers should get deleted eventually.
Maybe it's because @neekt is reusing available numbers, and the dedupe gets screwed up, as per your exchange here https://github.com/mozilla/multi-account-containers/pull/1611#discussion_r366477898 and the list of deleted containers gets confused?
I'm hitting this myself but turning off sync hasn't helped. I have 1,000s of containers and manually deleting (which is not fun) only works for a minute or two until they all come back.
If turning off sync in MAC lets the container reappear, then that's definitely a MAC bug that you might want to report there.
Did you have "Reuse available numbers" active in TC while MACs sync was active?
~~Just a heads-up; I have the same issue of TCs not getting deleted, but I'm not using the MAC extension at all - I'm using Containerise - so the issue might not be in MAC itself, but rather elsewhere in Firefox or the Sync system. I only use one computer but I do have Sync enabled. TC is set to keep counting.~~
Edit - Sorry, false alarm. I did have about 20 TCs lingering in my list (which is why I was here to begin with) but they may have been leftover from when I was trying out the updated MAC. I had MAC with its sync enabled for a few days before deciding to disable it and continue with Containerise.
Now (without MAC), after deleting the leftover TCs and trying to reproduce the issue, I've found that everything is working perfectly; newly abandoned TCs are deleted immediately and don't reappear. Thanks for your help.
@okradonkey TCs not getting deleted at all without MAC is a different issue (since the container sync is part of MAC), and definitely shouldn't happen. Would you mind:
- Setting the removal delay to instant (Preferences > "Delete no longer needed Temporary Containers" > "After the last tab closes")
- Preparing an debug log
- Opening and closing an TC
- Posting the debug log as new issue?
See also https://bugzilla.mozilla.org/show_bug.cgi?id=1616137
Can anyone suggest a way to delete all the containers? I have over a thousand, it's inhumane to delete them by hand. I turned off sync but they're still there slowing everything down.
@3dc1d3
You could remove all containers that aren't currently active temporary containers, though that will remove all your permanent containers that you might want to keep.
To remove all containers except currently active temporary containers:
- Backup your profile(s)
- Navigate to
about:debugging#/runtime/this-firefox - Click "Inspect" right to Temporary Containers
- Click "Console"
- Insert into the console Edit: Might want to use https://github.com/stoically/temporary-containers/issues/371#issuecomment-617626349 instead
- If you're getting a "Scam warning", type "allow pasting" into the console, remove it again, and then insert code from last step again
- Press Enter and wait for the console to print
done
Related issue over at MAC: https://github.com/mozilla/multi-account-containers/issues/1675
Thanks @stoically. Unfortunately I just used that to remove more containers than I wanted due to an unfortunate press of the Enter key, but for those who want to avoid that, this snippet should only remove containers starting with tmp:
const containers = await browser.contextualIdentities.query({});
await Promise.all(containers.map(container => {
if (tmp.container.isTemporary(container.cookieStoreId)) return;
const prefix = 'tmp';
if (container.name.substring(0, prefix.length) !== prefix) {
return;
}
// could add exceptions here for other permanent containers,
// e.g. by looking into the containers.json, like so:
// if (container.cookieStoreId === "firefox-container-123") return;
return browser.contextualIdentities.remove(container.cookieStoreId);
}));
console.log("done");
(People using a different prefix can replace tmp in const prefix = 'tmp'; with their prefix.)
thanks @stoically and @Vinnl - finally got around to it. 👍
hi, i try the @Vinnl code, it removes all tmp# containers.. but after a minute, all of them reappear. i disabled firefox sync for addons, and MAC sync too, and tmp# (and other containers not "tmp#" but deleted on the past, are keep reappearing) my firefox is too slow, is there any other alternative?
Would you care to uninstall MAC and try again?
Would you care to uninstall MAC and try again?
i broke my firefox profile doing the last operation. i load an old backup of my profile, then deactivate sync for my firefox account (for now i prefered to leave manual) and the problem is not present now (i know this is not a solution) i had to block the access to profile/wave/logs, because the directory continous creating a lot of log files that collapse my disk space.
i am wating for a real solution for this, if you want i can try do something else (after re-backup my profile again xD)
thanks!
Anyone have any luck with any workarounds?
I am also facing this issue, what is worse is due to some bug, 100 temporary containers were created and they are not getting deleted.
Same here. Script does not work. The massive amount of tmp containers really slows down FF.
@svendsvin You can delete the containers in a much easier way by going to Container Settings in Preferences.
To spare anyone else the time it took me to find the menu @krishnanunnir is talking about. It's not in the add-on preferences. It's in the main Firefox preferences, under the "General" tab.

actually the quickest way is to just type "about:preferences#containers" in the url bar. I have it bookmarked just for this purpose :)
"about:preferences#containers" is really helpful, would still be very useful to have a button in the Temporary Containers controls somewhere to 'delete all temporary containers now'. If there's a disagreement with MAC sync at some point it seems like I could just shutdown browsers and clear them individually using this button.
actually the quickest way is to just type "about:preferences#containers" in the url bar. I have it bookmarked just for this purpose :)
thank you!
After updating to 82.02 the problem seems to have disappeared. Sync is enabled. I restarted FF several times and all temporary containers are removed.
After updating to 82.02 the problem seems to have disappeared. Sync is enabled. I restarted FF several times and all temporary containers are removed.
same here! thanks!
Not for me. As long as a second computer is used, all my temporary containers from the past come back. I tried several orders of enabling/disabling the sync feature on the addon and enabling/disabling the addon syncing from the cloud. They always come back for me. 82.02 was no better than before for me.
the first thing i did, was enable addons sync and enable sync from containers.. after that the hundred of tmp containers reappears :( next, i started to delete each of tmp containers (included non tmp or old containers backedup) after delete all of them, they are gone forever.. i lost some websites asigned to containers that mixed current and backedup, but after that, all is fine now. i hope this can help.
I did the same thing. But when I went to my second machine to do the same process, the temporary containers were back on the primary machine again. After cleaning them up, they were back on the second one, and so on...
i understand.. sorry for my next suggestion i know that not resolves the problem directly but... if you copy your firefox profile directory to the second machine (after your "clean" your first profile) ? maybe it can work
My current workaround (note: will delete all container and reset to default). The pros of this step is dont need new profile. I used TC with MAC & FBC & Google Container. YMMV.
- disable sync in MAC
- click Disable Extension until can uncheck Enable Container Tabs (see image below)

- restart Firefox
- enable all container add-ons again (
about:addons)