Categories: TutorialsUbuntu

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.

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.

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):

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.

Ubuntu Server Admin

Recent Posts

🚀 Deploy Elastic Stack on Ubuntu VPS (5 Minute Quick-Start Guide)

Here’s the guide to deploy Elastic Stack on Ubuntu VPS, with secure access, HTTPS proxying,…

2 days ago

🚀 Deploy Nagios on Ubuntu VPS

This guide walks through deploying Nagios Core on an Ubuntu VPS, from system prep to…

2 days ago

Shoryuken Has a New Maintainer, and v7.0.0 Is Almost There

After a decade under Pablo Cantero's stewardship, Shoryuken has a new maintainer - me. I'm…

6 days ago

A better way to provision NVIDIA BlueField DPUs at scale with MAAS

MAAS 3.7 has been officially released and it includes a bunch of cool new features.…

2 weeks ago

Ruby Floats: When 2.6x Faster Is Actually Slower (and Then Faster Again)

Update: This article originally concluded that Eisel-Lemire wasn't worth it for Ruby. I was wrong.…

2 weeks ago

MicroCeph: why it’s the superior MinIO alternative (and how to use it)

Recently, the team at MinIO moved the open source project into maintenance mode and will…

2 weeks ago