Firefox on Ubuntu 22.04 (and 22.10, 23.04, and later) from .deb (not from snap)

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-upgrades 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.

6 thoughts on “Firefox on Ubuntu 22.04 (and 22.10, 23.04, and later) from .deb (not from snap)

  1. Stephen Cormier

    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

    Reply
  2. MPippik

    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.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.