How to Install Firefox as a DEB Package on Debian, Ubuntu, or Linux Mint

Firefox DEB

Starting with Firefox 122, Mozilla now provides a DEB package for Linux users using Ubuntu, Debian GNU/Linux, Linux Mint, or another derivative distribution. Here’s a quick tutorial on how to install Firefox as a DEB package.

Firefox is the most popular open-source web browser among many Linux distributions. Yet, it comes pre-installed from the distro’s software repositories and users won’t always receive the latest versions as soon as they’re available upstream, nor the benefits of the official DEB package built by Mozilla.

The Firefox DEB package promises better performance due to Mozilla’s advanced compiler-based optimizations and hardened binaries with all security flags enabled during compilation. In addition, you’ll get access to the latest stable updates as fast as possible and you won’t have to restart Firefox anymore after upgrading it.

To install the Firefox DEB package on Ubuntu, Debian GNU/Linux, Linux Mint, or another derivative distribution, you have two alternatives: download the DEB package from or install an APT repository from Mozilla. This tutorial will cover the latter as you’ll always receive the latest Firefox version without hassle.

To install Mozilla’s APT repository, first create a directory to store the APT repository keys (if it doesn’t exist) by running the following command in the Terminal app.

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

Next, you need to import the Mozilla APT repository signing key so run the following commands.

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

Next, you must add the Mozilla APT repository to your sources list by running the following commands.

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

Next, you need to configure APT to prioritize packages from the Mozilla repository with the following commands.

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

Finally, it’s time to refresh the package list and install the Firefox DEB package with the next commands.

sudo apt-get update && sudo apt-get install firefox

That’s it! You now have the official Firefox DEB package from Mozilla installed on your Debian-based distribution. This tutorial should also work on other Debian or Ubuntu-based distros like Linux Lite or Bodhi Linux.

Mozilla’s APT repository also contains DEB packages for Firefox language packs if you want to install Firefox with a specific language. You can see the list of available languages with the apt-cache search firefox-l10n command and install your favorite language pack with the sudo apt-get install firefox-l10n-fr command (replace fr at the end of the command with the language code you want to install).

Source: Mozilla

Last updated 3 months ago

Buy Me a Coffee at ko-fi.com