How to Install Latest Firefox as classic Deb in Ubuntu 22.04

Last updated: April 14, 2022 — 20 Comments

Ubuntu 22.04 finally removed the .deb package for Firefox web browser from it’s repository! Here’s how to install it back.

As you may know, Firefox in Ubuntu 22.04 is a Snap package that runs in sandbox. It’s easy to remove it. But when you try installing the deb package via apt, it just install the Snap version back!!

Like Chromium, the Firefox deb in Ubuntu 22.04 is an empty package that links to the Mozilla’s official Snap.

Ways to get Firefox in Ubuntu as deb:

Snap is OK. But when you trying to install Gnome Extensions, the browser doesn’t work at the moment! So, you need workarounds:

  • Firefox Linux tarball from Mozilla website
  • Firefox ESR PPA.
  • Firefox PPA.
  • Ubuntuzilla repository

The Linux tarball is a good choice, but it lacks desktop shortcut integration. And you have to manually download the latest package every time a new release is out!

Ubuntuzilla apt repository is another choice. Ubuntu refers to this repository many years ago when it was not updating Firefox package itself.

I prefer Ubuntu PPA via launchpad.net a bit more, and the “Mozilla Team” team PPA is what I’m going to introduce in this tuturial.

Install Firefox via “Mozilla Team” team PPA

The team described that it has assumed responsibility for Ubuntu’s official Firefox and Thunderbird packages.

And, the Firefox and Firefox ESR package maintainer for “Mozilla Team” team PPA, Rico Tzschichholz, is a well-known Ubuntu user who also maintains the official pakages for LibreOffice, Plank dock, and unbound DNS server.

1. Remove Firefox Snap

It’s OK to keep the default Snap package. But it will cause duplicated icons in search results.

NOTE: Export bookmarks and backup other important data before removing it!

To remove it, press Ctrl+Alt+T on keyboard to open terminal. Then, run the command:

sudo snap remove firefox

2. Add Mozilla Team PPA

In terminal, run the command below to add the PPA. Type user password (no asterisk feedback) when it asks and hit Enter to continue.

sudo add-apt-repository ppa:mozillateam/ppa

As the PPA description indicates, the PPA was previously created for Firefox ESR and Thunderbird. It now contains the latest Firefox too.

3. Install Firefox via apt

Tip: the commands in this step also installs Firefox for the old Ubuntu 16.04. Though sudo apt update need to be run first.

Finally, run the command below to install the latest Firefox package as deb:

sudo apt install -t 'o=LP-PPA-mozillateam' firefox

Here -t 'o=LP-PPA-mozillateam' specifies to install Firefox from that PPA. It’s required until you set higher PPA package priority (see next step).

For choice, you may install Firefox ESR instead. It’s another official Firefox package that moves slowly and targets for school or enterprise use.

sudo apt install firefox-esr

4. Set PPA priority:

The empty Firefox deb in Ubuntu’s official repository has version number 1:1snap1-0ubuntu2. It’s always higher than the PPA package version. Running package updates either via sudo apt upgrade or ‘Software Updater’ will automatically install the official one which redirects to Snap.

To workaround the issue, you have to set a higher PPA priority. To do so, run the command below in terminal (Ctrl+Alt+T):

sudo gedit /etc/apt/preferences.d/mozillateamppa

The command creates and opens empty config file in Gedit text editor. When it opens, add the lines below and save it:

Package: firefox*
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 501

After saving the file, run sudo apt update command in terminal to apply changes.

sudo apt update

How to Restore Firefox Snap:

Just remove the Mozilla Team PPA using ‘Software & Updates‘ utility under Other Software tab.

After that, either launch Software Updater to upgrade Firefox or use apt command below. Both of which will automatically install back the pre-installed Snap package.

sudo apt update && sudo apt install firefox

That’s all. Enjoy!

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to remind me outdated tutorial! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected] Buy me a coffee: https://ko-fi.com/ubuntuhandbook1

20 responses to How to Install Latest Firefox as classic Deb in Ubuntu 22.04

  1. What about bookmarks and passwords, where are they?

  2. “…but it lacks desktop shortcut integration.” can be solved using:

    sudo wget https://raw.githubusercontent.com/mozilla/sumo-kb/main/install-firefox-linux/firefox.desktop -P /usr/local/share/applications

    and Firefox will automatically update very fast, when enabled in preferences.
    This can be verified in –> Help –> about Firefox

  3. Great post :D Thanks a lot for help. Someone should hang the guy responsible for removing firefox deb from ubuntu. SSO Doesn’t work in snap mode.

  4. AFAIK, ‘zilla-bsed browsers – with the exception of LibreWolf – always update ‘in-situ’. All they do is to re-write the contents of the ‘firefox’ directory.

    At least, that’s how it’s always worked for me…

  5. the state of things April 10, 2022 at 10:06 am

    The ‘cost’ of using Ubuntu is constantly rising. It’s high time to reconsider using something else. There are better distributions out there with better native packaging, less bloat and more up to date.

  6. I have used the Ubuntuzilla repository for Firefox, Firefox ESR, Seamonkey and Thunderbird for years and been highly satisfied with there versions. There were versions of standard Thunderbird Gmail told me were not secure and would not let me use for my gmail account, but the Ubuntuzilla version never had that problem

  7. John Lauterbach April 15, 2022 at 4:18 pm

    Your suggestion was total waste of time. The Firefox PPA you recommended wouldn’t work, It timed out even with very fast internet connection. Moreover, it killed all my history on reinstalling Firefox even with syncing

  8. So if the Ubuntu Firefox team is building and maintaining Firefox for the PPA, how is it saving Canonical any work to package the thing as a Snap? The whole idea of the Snap for Chromium and Firefox was supposed to be to reduce the burden on Canonical… but now instead of building it just as a .deb for each version, they are building it as a .deb, maintaining a separate PPA, building it as a Snap, and maintaining it as a Snap. That’s less work, I guess??

  9. so, how to connect gnome extentions in firefox snap?!

    • Firefox snap just don’t support this feature so far due to sandbox permission issue. Just wait or switch to another package.

  10. Thanks for the instructions.

    We can set the PPA before installing Firefox with: sudo apt install firefox

    No need to add: -t ‘o=LP-PPA-mozillateam’

    • My wrong, should be:

      We can set the PPA *priority* before installing Firefox with: sudo apt install firefox

      So, the steps would be:

      1. Remove Firefox Snap
      2. Add Mozilla Team PPA
      3. Set PPA priority
      4. Install Firefox via apt (without -t ‘o=LP-PPA-mozillateam’)

      • Hello,
        I did exactly that on the latest Ubuntu Mate 22.04 but I can’t find the shortcut of the new Firefox deb, do you know where I can find it? Can’t launch the app.

  11. Rasmus Skramstad April 22, 2022 at 10:41 am

    If you use the force flag -f for installation sudo apt install -f -t 'o=LP-PPA-mozillateam' firefox you can install firefox and keep the old data from the snap. After the new firefox deb package is installed you can remove the snap, be sure to open the new deb firefox before you remove the snap to import your settings/data.

    • Thanks for the tip, but it seems not importing bookmarks automatically. I’m running a fresh Ubuntu system, there’s no enough browsing data to try out other change.

  12. You can download latest official .deb build for Ubuntu 22.04 LTS (Jammy) here:
    https://launchpad.net/~phd/+archive/ubuntu/firefox/

    This is a PPA repository with official Ubuntu packages released originally for Ubuntu 20.04 LTS (Focal) and updated automatically as soon as a new version is released.

  13. This seems to be an old version you get. I think it’s time to evaluate a new browser. Thanks Mozilla for a good browser over the past years.

  14. I followed these directions and the “apt install…” actually just installs the snap, so this is a complete waste of time.

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

*

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