So you want to install Mozilla Firefox as a deb package on Ubuntu 22.04 LTS or above, and not as a snap app.
No problem; I show you how in this guide.
Ubuntu uses Firefox as its default web browser, but since 2022 the app comes preinstalled as a snap package. Worse, if you uninstall the Firefox snap and run apt install firefox
you DO NOT get a deb version but a transition package that reinstalls the Firefox snap.
Annoying, especially if you specifically do not want to use the Firefox snap.
Now, Snap apps have a number of benefits, including better security and faster updates, but there are negatives too.
Some features don’t work in the snap sandbox environment; system integration may be hit or miss depending on what’s required; startup times for snap apps are slow; and you can’t choose when to install an update, it happens automatically.
While there are workarounds (Canonical finally added some terminal commands to pause automatic updates, for instance) you might not be convinced.
So if you’re looking to de-snap Ubuntu and install a Firefox deb, read on!
Installing Firefox via Apt (Not Snap)
You can install a Firefox deb on Ubuntu 22.04 to 23.10 from the Mozilla Team PPA, then ‘pin’ the package (this makes sure that Ubuntu’s pesky Firefox Deb transition package doesn’t overwrite things and reinstall the Firefox snap).
But before going further make a backup/export of any important browser settings, bookmarks, and other data from Firefox, just incase sometimes goes wrong.
Step 1: Run this command to remove the Firefox Snap:
sudo snap remove firefox
Step 2: Run this command to add the Mozilla Team PPA to your list of software sources:
sudo add-apt-repository ppa:mozillateam/ppa
Step 3: Chance the Firefox package priority to ensure the PPA/deb/apt version of Firefox is always preferred. To do this, copy and paste this whole code (not line by line):
echo ' Package: * Pin: release o=LP-PPA-mozillateam Pin-Priority: 1001 ' | sudo tee /etc/apt/preferences.d/mozilla-firefox
Step 4: If you want future Firefox upgrades to be installed automatically, Balint Reczey has a concise command on his blog to do this:
echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox
Step 5: Finally, install the Firefox deb using apt
:
sudo apt install firefox
Once this install is complete, open the app launcher and click on the Firefox icon to launch the non-Snap Firefox build. You can then pin this to the Ubuntu Dock.
Sidenotes…
I would ask that you keep in mind that any bugs, missing features, and missing system integrations (like those affecting third-party password managers) are being addressed, worked on, and fixed by Ubuntu, so consider hanging tight for a solution.
But since some of you have asked me how to replace the Firefox Snap with a deb version (short of downloading and linking to the Firefox binary, which is not the worst way to run it; it was my workaround during 21.10) this is my recommended solution.