Great news for Ubuntu users! Mozilla has just launched an official repository for you to download and install the Firefox browser as a native application easily. This is a fantastic option, especially if you’re looking for an alternative to the default Snap package version of Firefox that comes by default with Ubuntu.
But before proceeding, let’s clarify why this new option might be better for you.
- Enhanced Performance: With over 25 years of expertise, Mozilla’s deep knowledge of Firefox enables it to optimize its performance using advanced techniques. Remember, using other DEB packages might mean missing out on these enhancements.
- Prompt Updates: Stay up-to-date effortlessly with Firefox. Mozilla’s new APT repository links directly to their release cycle, bringing you the latest features and security updates faster.
- Mozilla’s Own Build: Firefox from Mozilla’s repo is 100% made by Mozilla! This means you get an unmodified directly-from-the-source Firefox.
Now that we’ve cleared things up, we can proceed to the main subject of this guide: installing Firefox as a traditional DEB application on Ubuntu 24.04 (Noble Numbat) or 22.04 (Jammy Jellyfish) LTS versions. The first thing we’ll need to do is remove its Snap version.
Remove Ubuntu Firefox’s Snap Version
You might have checked out some other guides before finding ours. However, some of them sometimes miss a crucial step before installing the DEB version of Firefox on Ubuntu: removing the current Snap one. But if you overlook this step, though, you’ll end up with this:
In other words, it means having two identical versions of the same app. To avoid this situation, first, you must uninstall the Snap version of Firefox, which is quite simple. Open your Terminal application and run the following command.
sudo snap remove --purge firefox
Code language: Bash (bash)
Alright, we’re all done saying farewell to the Firefox Snap version. Next up, let’s switch gears and install Firefox as a native DEB application on our Ubuntu 24.04 system.
Install Firefox as DEB on Ubuntu 24.04/22.04 LTS
Import Mozilla Repo’s Key
Let’s first add the Mozilla APT repository signing key to get started. This is essential because it confirms that the software we’re installing is genuinely from Mozilla. It’s like getting a seal of approval for its authenticity, reliability, and safety.
So, first, let’s pull it out and put it in its proper place.
wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null
Code language: Bash (bash)
As you can see, the command didn’t produce any output, but no worries, that’s completely normal. Let’s keep going!
Next, let’s do the import itself:
gpg -n -q --import --import-options import-show /etc/apt/keyrings/packages.mozilla.org.asc | awk '/pub/{getline; gsub(/^ +| +$/,""); print "\n"$0"\n"}'
Code language: Bash (bash)
You should get the fingerprint “35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3,” which guarantees you that the key you’ve imported is authentic.
Add the Firefox Repo to your Ubuntu 24.04/22.04 System
Let’s go ahead and add Mozilla’s official repository, hosting the DEB packages we need to install Firefox, to our Ubuntu system. The command below (again) won’t produce any visible results.
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
Code language: Bash (bash)
Prioritize Mozilla’s Repo
Let’s take a moment to understand why it’s important for us to give priority to the new Mozilla repository we’ve added and what this really involves. We like to do things this way, ensuring everything is clear before proceeding to the next step.
In Ubuntu, the APT command handles packages, including installing, updating, and removing software. But sometimes, multiple repositories are added to your system that provide different versions of the same package, as is the case with Firefox.
In other words, the browser is now available from our newly added Mozilla repository. Plus, it’s also in the Ubuntu one as a Snap package. Here’s a fun fact: if you type “apt install firefox” now, you’ll end up downloading and installing its Snap version. But that’s not what you’re looking for!
To avoid this, we’ll use a mechanism called “pinning” in APT. We must tell APT to prioritize the Mozilla repository as the first option when installing Firefox. Copy the snippet below and execute it in the terminal:
echo '
Package: *
Pin: origin packages.mozilla.org
Pin-Priority: 1000
' | sudo tee /etc/apt/preferences.d/mozilla
Code language: Bash (bash)
This way, you’re essentially saying, “Hey APT, I trust and prefer this repository more, so please use packages from here whenever possible.”
Install Firefox from Mozilla’s Repo on Ubuntu 24.04/22.04 LTS
It’s time to reap the rewards of our hard work. Let’s refresh our list of software, and you’ll be pleased to find that it now includes our newly added Mozilla repository.
sudo apt update
Code language: Bash (bash)
Finally, go ahead and install Firefox in the usual way by executing the following command:
sudo apt install firefox
Code language: Bash (bash)
Once the installation is finished, go to the GNOME dash and type “firefox” to find it. Then, youโre all set to launch and enjoy it in its most up-to-date version!
Conclusion
Installing Firefox as a native DEB application on Ubuntu 24.04 LTS or 22.04 LTS from Mozilla’s official repository means, above all, that you are using a version of the browser in its purest form, directly delivered by its developers that is fully supported and regularly updated.
The best part is that you get enhanced performance compared to the Snap version. In addition, by following this guide, you’ve learned how to install Firefox more traditionally and arguably efficiently and gained some insight into the workings of Ubuntu’s package management system.
Our guide on the subject is here if youโd like to do the same with the Thunderbird mail client, which also comes by default as a Snap app in Ubuntu 24.04.
So, enjoy your newly installed Firefox and its improved web experience. Thanks for your time, and happy browsing! Your feedback and comments are, as always, most welcome.