How to migrate installed Firefox (installed once from classic package) to snap. Latter one still not installed. Aimed goal: To have Firefox in snap app as well as unchanged user experience in Firefox after this migration is completed. Will it suffice to understand Firefox generic user data usage/local configuration as well as how snaps are working in general? In other words: Any specifics regarding Firefox machin-local/user configuration when Firefox is installed in snap (except snap framework specifics)?
The user configuration data of snap applications reside under the "snap" folder in your home folder. You can move your existing profile to the appropriate location so the snap folder has access to it.
A way to do that without risking to break anything is the following. Keep your current firefox installation for the time being.
Install the snap version of firefox
snap install firefox
Or use any other method for installation if you prefer.
Run the snap version once.
You will now have two undistinguishable Firefox icons in your application overview. Run the snap version of firefox with the command:
snap run firefox
This will create a default user configuration in the folder "firefox" under "snap" in your home folder.
** Quit any of your running Firefox instances **
Open the respective profile folders.
Open following folders in two file manager windows side by side. Turn "Show hidden filed" on.
Here, $USER stands for your own login name.
Delete the newly created snap profile.
Under the SNAP folder, delete the profile folder you just created. It is named as
<random string>.default, e.g.
b0aix2sy.default: the first part are random characters that are different for each installation.
Transfer your profile to the snap version.
Copy your "normal" profile over from the NORMAL folder to the SNAP folder. It is named as
<random string>.default-release. There will also be a folder with extension
default. Leave that alone. It is the
default-release folder that contains your user data.
Rename extension of copied profice
Rename the copied folder to change the extension from
default. Copy the folder name to the clipboard.
In the SNAP folder, open the file
profiles.ini with text editor. On the line
Path=<random number>.default, change the folder name to the name of the folder you copied. Save the file and exit the editor.
Now, when you start the snap installation of firefox, it will be configured as your current installation. If all is well, you can delete the folder
.mozilla in your home folder and remove the regular version of firefox:
sudo apt remove firefox.
Awesome! I ran into trouble migrating to 22.04 LTS. One minor aspect was to ensure that the old profile is listed under
profiles.inifolder.– ColinApr 26, 2022 at 3:05
Note that this works only if the firefox .deb is still installed. In 22.04 I had to reinstall the firefox .deb using these instructions: omgubuntu.co.uk/2022/04/… . I also had to use the
--allow-downgradeflag according to here: shkspr.mobi/blog/2021/10/how-to-fix-an-upgraded-firefox-profile May 2, 2022 at 11:49
@krumpelstiltskin It works as long as your user profile is there. That is not removed when you uninstall firefox. It is, however, automatically migrated to snap as part of an Ubuntu system upgrade.– vanadiumMay 2, 2022 at 18:41
Did anyone who has done this, notice this problem emerged: askubuntu.com/questions/1409346/… ?– ColinMay 21, 2022 at 14:34
Thanks, this worked. I changed from 21.10 to 22.04, and got forcibly migrated to the snap – only today I noticed that my bookmarks and saved passwords are gone. I guess the snap was originally already installed in December, but I've never used it, so it didn't automatically migrate the profile when the non-snap Firefox was gone. Jul 30, 2022 at 20:14
For upgrade from 20.04 to 22.04
I found the accepted answer useful, but my experience on the LTS upgrade path was not quite the same.
This answer assumes that you gave the upgrader permission to migrate Firefox to snap. The upgrade had removed the
deb version of Firefox and it had migrated (copied) all the profiles over but not included them in
So my solution:
- Run firefox once, then quit it. I'm not sure if this is totally necessary, and you've probably already run it, that's why you're here.
/home/$USER/snap/firefox/common/.mozilla/firefoxit should contain your profiles which have been copied over from
/home/$USER/.mozilla/firefox. Those are the randomly named directories. If not them copy them over, the old location won't have been deleted.
- Launch Firefox and browse to
- Use the UI in there to launch profiles until you find the right one, then set that as the default
Unless you use multiple profiles, you'll probably only find two profiles in the
about:profiles window, one will be new and blank, and the other will be the one you're looking for.