Flatpak Firefox + import Firefox profile from Snap

Firefox on Debian

Theres two “happy paths” with Firefox on Debian listed on the WIKI:

  1. Firefox ESR (Extended Support Release) - older/more stable version. Usually installed by default
  2. Flatpak/flathub latest Firefox

If your coming from a recent Ubuntu you will need to use a recent Firefox since you cant import the profile from a newer version of Firefox into an older version of Firefox.

Therefore, we focus on using Flakpak Firefox in this post. Follow the Debian WIKI instructions for installation - no point duplicating them here.

Once Flatpak Firefox is installed make sure to make it the default web browser, test that it works, then remove the Firefox ESR package: apt remove firefox-esr. This is important so you avoid loading the “wrong” firefox and getting your bookmarks jumbled up between both installations.

Find the old profile from Ubuntu

Assuming you have a preserved homedir ($OLDHOME) from your Ubuntu system somewhere, first find the place where Firefox data was stored. If you have a Ubuntu installation that has been updated over the years you will likely find two locations:

  1. $OLDHOME/.mozilla - this is the .deb version
  2. $OLDHOME/snap/firefox/common/.mozilla/ - this is the Snap version

In my case I found data in both locations but of course $OLDHOME/.mozilla had data that stopped many months ago because the Firefox Snap was installed.

Do the import

Most of the guides I came across advise copying the entire .mozilla directory but I was not able to get this to work. Instead, I had to find the active profile and only copy that.

Find the active new profile

  1. Load Flatpak firefox
  2. (hamburger) -> Help -> More troubleshooting information
  3. Find the value for Profile Directory. A full path is listed (eg /home/geoff/.mozilla/firefox/deadbeef.default-release). This path does not capture the true path in Flatpak, we are interested only in the last directory in the path (deadbeef.default-release).
  4. Find the directory from the previous step in your Flatpak directory, it should be under ~/.var/app/org.mozilla.firefox/.mozilla/firefox/, eg ~/.var/app/org.mozilla.firefox/.mozilla/firefox/deadbeef.default-release
  5. Exit firefox
  6. Delete everything in the profile directory but not the directory itself, eg rm -rf ~/.var/app/org.mozilla.firefox/.mozilla/firefox/deadbeef.default-release/*

Find the active old profile

There’s probably a more accurate way to do this but I just looked for the largest directory under $OLDHOME/snap/firefox/common/.mozilla/ that had recent changes: $OLDHOME/snap/firefox/common/.mozilla/firefox/deadd00d.default

Copy the files

Now just copy the files into the new profile location, make sure to chown if needed:

cp $OLDHOME/snap/firefox/common/.mozilla/firefox/deadd00d.default/* .var/app/org.mozilla.firefox/.mozilla/firefox/deadbeef.default-release/


Now start Firefox, you should have your old browser settings back immediately so see if all your tabs opened back up, etc.

Firefox Account?

Firefox Account would let you skip the above steps and sync your old settings into Firefox using the cloud… Interesting.


If it didnt work you may have copied the wrong profile, or used the wrong location: rm -rf ~/.mozilla if you removed Firefox ESR to avoid confusion. You can retry the above steps as many times as you like as long as you dont damage the files your importing (so use cp not mv).

Best to keep the backups around for a little while until Firefox is working for a few days, then delete.

Post comment