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 let’s dive into the main focus of this guide: installing Firefox as a traditional DEB application on Ubuntu 22.04 LTS. 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 hey, if you overlook this step, though, you’ll end up with this:
That’s amazing! Having two identical versions of the same app is like a dream come true, right? Just imagine being able to pick whichever one you feel like using. But no more nonsense – just a little joke there!
We take our guides very seriously and always ensure they’re thoroughly tested and reliably effective. We’re really proud of this! You’re in luck being here with us because we guarantee you’ll find the best solutions and approaches.
So, to start off, let’s uninstall the Snap version of Firefox, which is quite simple. First, open your Terminal application. Once it’s open, you’ll need to run the following command.
sudo snap remove --purge firefox
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 22.04 system.
Install Firefox as a DEB App on Ubuntu 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: JavaScript (javascript)
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: JavaScript (javascript)
You should get the fingerprint “35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3,” which guarantees you that the key you’ve imported is authentic.
Add the Firefox Repo to your Ubuntu 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: PHP (php)
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: PHP (php)
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 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
Finally, go ahead and install Firefox in the usual way by executing the following command:
sudo apt install firefox
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
There you have it – a comprehensive step-by-step guide to installing Firefox as a native DEB application on Ubuntu 22.04 LTS directly from Mozilla’s official repository. This method offers various benefits, including enhanced performance, prompt updates, and the authenticity of Mozilla’s own build.
In addition, by following this guide, you’ve learned how to install Firefox in a more traditional and arguably efficient way and gained some insight into the workings of Ubuntu’s package management system.
So, enjoy your newly installed Firefox browser and the improved web experience it brings. Thanks for your time! Your feedback and comments are, as always, most welcome.
Many thanks for this guide, I will be using it for every Ubuntu install from now on to have a stable and working Firefox install.
In my Ubuntu 22 LTS setup, I use very little Snap, Flatpak and DEB installs. I prefer Standalone Binaries or Appimages. My Firefox is the Standalone Binary version and it runs silky smooth. It just updated to version 122 a little while ago. It only downloaded the necessary updated files, about 20MB. Just my 2 cents worth.
Not working for me… I’m using Pop OS and it’s still pulling from pop repo…
So on Pop you have to set your pin priority to 1002, as the Pop OS repos are 1001
Very dangerous guide! It will destroy all your existing browser data, sessions, bookmarks and so on!
Actually, on my Pop OS, all my settings, extensions, bookmarks, sync, etc were retained just fine.
FWIW: I use the following procedure to make use the mozilla team’s launchpad packages on ubuntu:
# purge firefox.snap
sudo apt-get purge firefox
# may fail – don’t care.
sudo umount /var/snap/firefox/common/host-hunspell
# to get rid of snapd junk (optional but recommended ;))
sudo apt-get purge snapd
sudo rm -rf /snap /var/snap /etc/systemd/system/snap* \
/etc/udev/rules.d/70-snap.* /etc/apparmor.d/abstractions/snap_browsers \
/etc/systemd/system/multi-user.target.wants/snap* \
/etc/systemd/system/multi-user.target.wants/var-snap* \
/etc/systemd/system/var-snap* \
/var/cache/apparmor/*/snap*
sudo sed -i -e ‘/snap/ d’ /etc/apparmor.d/usr.bin.evince
# hint apt
printf ‘deb http://ppa.launchpad.net/mozillateam/ppa/ubuntu jammy main\n’ | \
sudo tee /etc/apt/sources.list.d/mozilla.list
printf ‘Package: *\nPin: release o=LP-PPA-mozillateam\nPin-Priority: 999\n’ | \
sudo tee /etc/apt/preferences.d/mozilla.pref
gpg –keyserver keyserver.ubuntu.com –recv-keys –homedir /tmp 9BDB3D89CE49EC21
gpg –export –armor –homedir /tmp 9BDB3D89CE49EC21 | \
sudo tee /etc/apt/trusted.gpg.d/mozilla.asc
sudo chmod 0644 /etc/apt/trusted.gpg.d/mozilla.asc
rm -f /tmp/pubring.kbx
# install FF
sudo apt-get update
sudo apt-get install firefox firefox-locale-de
Is there an arm64 version of the .deb?
To my knowledge, no.
Best,
Bobby
Not that I could find, and I looked. It’s a real shame…