It is now widely known that Ubuntu 22.04 LTS (Jammy Jellyfish) ships Firefox as a snap, but some people (like me) may prefer installing it from .deb packages to retain control over upgrades or to keep extensions working.
Luckily there is still a PPA serving firefox (and thunderbird) debs at https://launchpad.net/~mozillateam/+archive/ubuntu/ppa maintained by the Mozilla Team. (Thank you!)
You can block the Ubuntu archive’s version that just pulls in the snap by pinning it:
$ cat /etc/apt/preferences.d/firefox-no-snap
Package: firefox*
Pin: release o=Ubuntu*
Pin-Priority: -1
Now you can remove the transitional package and the Firefox snap itself:
sudo apt purge firefox
sudo snap remove firefox
sudo add-apt-repository ppa:mozillateam/ppa
sudo apt update
sudo apt install firefox
Since the package comes from a PPA unattended-upgrade
s will not upgrade it automatically, unless you enable this origin:
echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox
Happy browsing!
Update: I have found a few other, similar guides at https://fostips.com/ubuntu-21-10-two-firefox-remove-snap and https://ubuntuhandbook.org/index.php/2022/04/install-firefox-deb-ubuntu-22-04 and I’ve updated the pinning configuration based on them.
For months now on Ubuntu 22.04 I have used the tarball downloaded from mozilla. Extract it to a directory, my ~/bin, create the .desktop file to point to the bin and it just works. It has updated all along as the new versions come out, no extra ppa needed. From my notes.
Get recent version of Firefox from tarball I removed the snap version.
https://fostips.com/install-latest-firefox-non-esr-debian/
The .desktop file I used for starting it.
nano ~/.local/share/applications/firefox.desktop
[Desktop Entry]
Name=Firefox
Comment=Browse the World Wide Web
GenericName=Web Browser
X-GNOME-FullName=Firefox Web Browser
Exec=/home/zeus/bin/firefox/firefox %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=/home/zeus/bin/firefox/browser/chrome/icons/default/default128.png
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;a>
StartupWMClass=Firefox
StartupNotify=true
I do the same and no extra efforts needed.
Thank you!
Thanks for the tip on reverting to Mozilla PPA in Ubuntu 22.04 LTS. However, because of increased reliance on Snap in v. 22.04, I’ll stick with 20.04 LTS. Snap has been removed from all five PC’s I maintain because of these issues:
1. Snap apps are often outdated — e.g., p7zip is at version 16, but 7-Zip v. 21.07 runs better under wine than the old Snap version.
2. Snap forces upload of the entire application with dependencies, rather than reusing packages, taking additional space.
3. Snap distribution is slow, at 1/10 speed of package download.
4. Snap decides when to update, not the user. While apt update can be deferred, not Snap.
Now, IrfanView, 7-Zip, DocFetcher and other Windows apps run faster under wine, and I control updating. Duplicated Snap apps, such as gnome-system-monitor, which had already been installed with apt, have been removed.
I decided to switch to debian.
I “sudo apt remove –purge snapd” and then follow these instructions: https://wiki.debian.org/Firefox#From_Mozilla_binaries