5 Steps to Switch to Firefox Deb installation on Ubuntu 22.04

5 Quick Steps to Switch to Firefox Deb Installation on Ubuntu 22.04

Interested in using the Firefox DEB version on Ubuntu? Let me guide you through it.

If you prefer DEB packages over snap packages, or simply want a different version of Firefox than the default one in Ubuntu 22.04, this tutorial is for you. I’ll walk you through the process of removing the existing Firefox installation and replacing it with the DEB version, step by step.

Let’s jump right in.

What You’ll Need

Before entering the main guide, you should know whether you have everything in place. Here are the requirements:

  • Ubuntu 22.04 version installed and running on your system (guide)
  • Familiarity with the command line interface and Linux commands (guide)
  • Root account or sudo privileges (guide)
  • Backup of your current Firefox settings
  • A stable internet connection

That being covered, let’s jump right into the first step.

How to Switch to Firefox Deb Installation on Ubuntu 22.04: 5 Steps

Step 1: Verify Your Current Firefox Installation

It’s important to first check which version of Firefox is currently installed on your system.

  1. Click on the Firefox icon in the left sidebar.
Clicking on the Firefox icon
  1. Click the hamburger menu button in the top right corner.
Clicking tthe hamgurger menu button on Firefox
  1. Select Help from the menu.
Help menu in Firefox
  1. Click on About Firefox.
About Firefox menu in Firefox browser
  1. This will display the type of Firefox package you are using. For instance, if it says Mozilla Firefox Snap for Ubuntu, you have the snap package installed.
Check Firefox package version on Ubuntu

If your Firefox version matches the snap package, you’re ready to proceed to the next step.

Step 2: Back Up Your Current Firefox Settings

Before removing Firefox, it’s crucial to back up your data, including bookmarks, preferences, and other important information.

  1. Open Firefox.
  2. Click the hamburger menu in the top right corner.
  3. Select Help, then More troubleshooting information.
More troubelshooting information menu in Firefox
  1. In the Application Basics section, find Profile Directory.
  2. Click on Open Directory. As you can see, the profile directory name is a random 8-character string. In my case, it’s mo1k3o2f.default.
Check the Profile Directory of Firefox
  1. Right now, you’re inside the profile directory. However, you want to be one level upper in the directory structure. To do that, press on firefox in the directory structure.
Navigating the Firefox profile directory
  1. Right-click on your profile directory and select Copy, or use Ctrl+C.
Copying the Firefox profile directory
  1. Paste the copied directory to a secure location, ideally an external drive.

With this backup, you’ll be able to restore your Firefox settings later.

Step 3: Uninstall Firefox Snap from Ubuntu

Now that you’ve backed up your settings, let’s remove Firefox Snap from your system.

  1. To uninstall Firefox Snap from your system, run the following command:
sudo snap remove firefox
Uninstall Firefox Snap version from Ubuntu
  1. After removing the Snap version, uninstall the empty DEB package with:
sudo apt remove firefox
Installing empty Firefox DEB package from Ubuntu

With the snap version of Firefox successfully uninstalled, you’re ready to install the Firefox DEB version.

Step 4: Install the Firefox DEB Package on Ubuntu 22.04

We will now install the Firefox DEB package. Direct installation via APT might revert to the snap version, so we’ll use a PPA (Personal Package Archive) for a workaround.

  1. Run this command to include the PPA in your system:
sudo add-apt-repository ppa:mozillateam/ppa
Adding the Mozilla PPA to Ubuntu
  1. Press Enter when prompted to confirm.
  2. To ensure APT selects the DEB package from the PPA instead of the default snap package, adjust the priority by creating a configuration file (I’ll be using the Nano text editor):
sudo nano /etc/apt/preferences.d/firefoxdeb

Note: You can feel free to use a different name than firefoxdeb

  1. Insert the following configuration:
Package: firefox*
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 1001
Setting Firefox pin priority
  1. Save with Ctrl+O, and exit Nano with Ctrl+X.
  2. Apply the changes by updating the cache:
sudo apt update
sudo apt update command in Linux
  1. Lastly, install Firefox DEB with this command:
sudo apt install firefox
installing Firefox DEB version on Ubuntu
  1. In case you want the ESR version of Firefox, run this command:
sudo apt install firefox-esr
  1. To confirm the installation, follow the steps in Step 1 of this guide to check the package version of Firefox. If everything went well, you should see the below output:
Checking new Firefox package version on Ubuntu

A successful installation will display the correct version. Following these steps ensures the installation of the Firefox DEB version on Ubuntu 22.04.

Step 5: Restore the Backup From the Snap Version

Now that the DEB version of Firefox is installed, you can restore your settings from the previous version.

  1. Open Firefox and click the hamburger menu in the top right corner.
  2. Navigate to Help > More troubleshooting information.
  3. Under Application Basics, find Profile Directory. Note the name of the profile, which is an 8-character string. In my case, it’s 7574kg5e.default-release.
Restore backup of Firefox
  1. Close Firefox.
  2. Go to the backup location of your previous profile settings.
  3. Rename the backup directory to match the new profile directory name. In my case, I’ll rename mo1k3o2f.default to 7574kg5e.default-release.
  4. Transfer the renamed profile folder to /home/<your-username>/.mozilla/firefox replacing <your_username> with your actual username. This is where Firefox stores profile data.
  5. Restart Firefox to check if the backup has been restored successfully.

How to Switch Back to the Ubuntu Snap Version of Firefox

If you decide to revert to the snap version of Firefox, follow these steps:

  1. Remove the PPA from the system with this command:
sudo add-apt-repository -r ppa:mozillateam/ppa
Switching back to Firefox Snap edition
  1. Press Enter to confirm the removal.
  2. Next, use the following command to remove the file you previously created:
sudo rm -rf /etc/apt/preferences.d/mozilla-firefox

Note: Replace mozilla-firefox with the actual name of your configuration file.

  1. Remove the Firefox DEB package:
sudo apt remove firefox
Removing Firefox DEB from Ubuntu
  1. Lastly, install the snap version with:
sudo snap install firefox
Install Firefox Snap on Ubuntu

After completing these steps, the snap version of Firefox will be reinstalled and ready to use.


Well done! You should now have the Firefox DEB version installed on your computer. This guide has covered how to transfer your settings and preferences between versions. Additionally, I’ve provided instructions for reverting to the snap version if needed. If you’re interested in more Firefox tutorials, check out how to install an older version of Firefox on Linux Mint.

If this guide helped you, please share it.

Related Posts