How to install firefox as deb on ubuntu (not snap)

How to Install Firefox as DEB on Ubuntu (Not Snap)

If you prefer to install Mozilla Firefox as a traditional DEB package rather than a snap app on Ubuntu 22.04 LTS (or later), you’re in luck. Follow this guide to install it using the official Mozilla APT repository.

By default, Firefox is packaged as a snap app in Ubuntu, but for versions 18.04 LTS and earlier, a DEB version was available. However, attempting to install Firefox via apt on newer versions reinstalls the Firefox snap package instead of providing the DEB version.

While snap packages offer advantages like enhanced security and release channel options, they also come with drawbacks such as limited system integration and automatic updates without user consent.

Sponsored

To install Firefox as a DEB package on Ubuntu 22.04 LTS and later, follow these steps:

  1. Add Mozilla APT Repository: Mozilla has introduced its dedicated APT repository for Debian-based distributions, including Ubuntu, with the release of Firefox 122 in January 2024. Adding this repository via command line is the recommended method for efficiency and reliability.
  2. Pin Firefox DEB Package: After installing Firefox from the Mozilla APT repository, it’s essential to pin the DEB package to prevent Ubuntu’s transition package from reinstalling the Firefox snap.
See also  Ubuntu Explained: How to ensure security and stability in cloud instances—part 3

Note: If you previously used the Mozilla Team PPA to install Firefox DEB packages, disable or remove the PPA to avoid conflicts.

Before proceeding, consider backing up important browser settings, bookmarks, and data from Firefox.

Once installed, you can access Firefox from the app launcher, using the Mozilla Firefox icon for the non-snap version. You can also pin the icon to the Ubuntu Dock for easy access.

When you’re done:

Step 1: Uninstall the Firefox Snap:

sudo snap remove firefox

Step 2: Create an APT keyring (if one doesn’t already exist):

Sponsored
sudo install -d -m 0755 /etc/apt/keyrings

Step 3: Import the Mozilla APT repo signing key (if wget is missing install it first):

wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null

Step 4: Add the Mozilla signing key to your sources.list:

echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | sudo tee -a /etc/apt/sources.list.d/mozilla.list > /dev/null

Step 5: Set the Firefox package priority to ensure Mozilla’s Deb version is always preferred. If you don’t do this the Ubuntu transition package could replace it, reinstalling the Firefox Snap:

echo '
Package: *
Pin: origin packages.mozilla.org
Pin-Priority: 1000
' | sudo tee /etc/apt/preferences.d/mozilla

Step 6: Finally, install the Firefox DEB in Ubuntu:

sudo apt update && sudo apt install firefox

Step 7 (Optional): To use a localised version of Firefox (i.e. the UI in a language other than American English) you need to install the corresponding language package, e.g., for French:

sudo apt install firefox-l10n-fr

You can see a list of all available language packs by running apt-cache search firefox-l10n.

Once you’ve installed everything open the app launcher, click the Mozilla Firefox icon to open your new non-Snap Firefox build, and away you go. Pin the icon to the Ubuntu Dock if you need to.

Keep in mind that any issues with missing features or system integrations present in the Firefox snap package are being addressed by Ubuntu developers. If you encounter such issues, consider waiting for a solution or proceed with the DEB installation method outlined above.

While there are alternative methods to replace the Firefox snap with a DEB version, this method provides a straightforward solution for installing Firefox on Ubuntu.

Leave a Comment

Only people in my network can comment.