Skip to content

Instantly share code, notes, and snippets.

@UnconventionalMindset
Created December 28, 2025 01:30
Show Gist options
  • Select an option

  • Save UnconventionalMindset/2d2c2860648b1d193f8a896461e60f4c to your computer and use it in GitHub Desktop.

Select an option

Save UnconventionalMindset/2d2c2860648b1d193f8a896461e60f4c to your computer and use it in GitHub Desktop.

Migrating from Firefox Flatpak to Firefox Pacman on Arch Linux

A complete guide to migrating your Firefox installation from Flatpak to the native Arch Linux package while preserving all your data, settings, bookmarks, and extensions.

Prerequisites

  • Arch Linux system
  • Firefox Flatpak currently installed
  • Access to terminal with sudo privileges

Migration Steps

1. Install Firefox via Pacman

First, install the native Firefox package:

sudo pacman -S firefox

Important: Do not remove the Flatpak version yet - we need to copy data from it first.

2. Close All Firefox Instances

Make sure Firefox is completely closed:

pkill -9 firefox

3. Copy Firefox Profile Data

Copy your Firefox profile from the Flatpak location to the standard location:

cp -r ~/.var/app/org.mozilla.firefox/.mozilla/firefox ~/.mozilla/

This copies all your:

  • Bookmarks and history
  • Extensions and their data
  • Saved passwords
  • Cookies and site data
  • Preferences and settings
  • Open tabs and session data

4. Fix Profile Configuration

The native Firefox installation uses a different installation ID than Flatpak, which can cause it to create a new empty profile instead of using your copied data. You need to update the configuration files to point to your existing profile.

Check which profile has your data:

du -sh ~/.mozilla/firefox/*/ | sort -h

Look for the largest profile (typically several hundred MB) - this contains your data. Note its name (e.g., bbeosbo1.default-release).

Update installs.ini:

  1. Open the file:
nano ~/.mozilla/firefox/installs.ini
  1. Find the section for your current installation (the first section, typically something like [4F96D1932A9F858E])

  2. Change the Default= line to point to your profile with data:

[4F96D1932A9F858E]
Default=bbeosbo1.default-release
Locked=1

Replace bbeosbo1.default-release with your actual profile name.

Update profiles.ini:

  1. Open the file:
nano ~/.mozilla/firefox/profiles.ini
  1. Find the section starting with [Install followed by a hash (e.g., [Install4F96D1932A9F858E])

  2. Update the Default= line to match your profile:

[Install4F96D1932A9F858E]
Default=bbeosbo1.default-release
Locked=1

Save both files (Ctrl+O, Enter, Ctrl+X in nano).

5. Verify the Migration

Launch Firefox:

firefox

You should now see:

  • All your bookmarks and history
  • All installed extensions
  • Your saved passwords and settings
  • Your previous browsing session (if that was enabled)

6. Clean Up Empty Profiles (Optional)

After confirming everything works, you can remove the empty profiles that were created:

# First, identify empty profiles (small size, typically < 100MB)
du -sh ~/.mozilla/firefox/*/

# Remove empty profiles (example names - check yours first!)
rm -rf ~/.mozilla/firefox/xze5vicp.default-release-1
rm -rf ~/.mozilla/firefox/phzg972a.default-release-1

Warning: Double-check you're removing the correct profiles. Only remove profiles that are small in size and were created during this migration.

7. Remove Firefox Flatpak (Optional)

Once you've confirmed everything works correctly for a few days, you can remove the Flatpak version:

flatpak uninstall org.mozilla.firefox

If you want to remove the Flatpak data as well:

rm -rf ~/.var/app/org.mozilla.firefox

Troubleshooting

Firefox Opens as Fresh Install

If Firefox still appears as a fresh installation:

  1. Verify the profile was copied:
ls -la ~/.mozilla/firefox/
  1. Check that your profile directory contains data:
ls -la ~/.mozilla/firefox/YOUR-PROFILE-NAME/

You should see files like places.sqlite (bookmarks/history), logins.json (passwords), etc.

  1. Double-check both installs.ini and profiles.ini are pointing to the correct profile.

  2. Make sure Firefox is completely closed before making configuration changes:

pkill -9 firefox

Permission Issues

If you encounter permission errors, ensure the copied files have the correct ownership:

chown -R $USER:$USER ~/.mozilla/firefox/
chmod -R 700 ~/.mozilla/firefox/

Profile is Locked Error

If you get a "profile is locked" error:

rm ~/.mozilla/firefox/YOUR-PROFILE-NAME/.parentlock
rm ~/.mozilla/firefox/YOUR-PROFILE-NAME/lock

Why This Migration is Necessary

Flatpak applications run in a sandbox with their own directory structure:

  • Flatpak Firefox data: ~/.var/app/org.mozilla.firefox/.mozilla/firefox/
  • Native Firefox data: ~/.mozilla/firefox/

The native package won't automatically find the Flatpak data, so manual migration is required.

Benefits of Using Native Firefox

  • Better system integration
  • Direct access to native messaging for extensions
  • Potentially better performance (no sandboxing overhead)
  • Simpler file paths and troubleshooting
  • More consistent with other Arch packages

Additional Notes

  • The migration process is non-destructive - your Flatpak data remains untouched until you explicitly remove it
  • You can always reinstall the Flatpak version and use the old data if needed
  • Consider waiting a few days before removing the Flatpak version to ensure everything works correctly
  • Firefox Sync can be used as a backup/alternative migration method, though it may not sync everything

References


Last Updated: December 2025 Tested On: Arch Linux with Firefox 133+ Guide by: Claude AI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment