How to Install Latest Firefox as classic Deb in Ubuntu 22.04

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

Also, remove the empty Deb package by running command:

sudo apt 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. 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

4. Install Firefox via apt

[ac-box style=”tip”]Tip: the commands in this step also installs Firefox for the old Ubuntu 16.04. Though sudo apt update need to be run first.[/ac-box]

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

sudo apt install 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).

The -t 'o=LP-PPA-mozillateam' flag is no longer required after setup PPA priority.

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

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!

By Ji m

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 Buy me a coffee:


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

  2. 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…

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

    1. suggestions? After continuous desktop use since Ubuntu 8, I’ve reached the end of my patience. Also the blue air constantly around me makes it hard to see.

      I used to have > 100 ubuntu desktops spread over 5 clients. The upkeep has made windows 10 a better option for all of these clients.

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

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

  6. 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??

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

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

    1. 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’)

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

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

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

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

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

  11. “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!”

    Bullshit. Mozilla’s tarball comes with autoupdate feature which will download patch and update Firefox to latest version. NOT in background, no, but while Firefox running. And its dont interrupt you to restart, update wil be applied when YOU feel like it.

  12. In step 1 you still need to do ‘sudo apt remove firefox’ also, or you can’t install it, because it tells you:

    $ sudo apt install -t 'o=LP-PPA-mozillateam' firefox
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    firefox is already the newest version (1:1snap1-0ubuntu2).
    0 to upgrade, 0 to newly install, 0 to remove and 83 not to upgrade.

  13. I installed the mozilla build version after removing the snap version.
    I did it because the snap version behaved poorly and didn’t work with my preferred apps.
    the Mozilla build had a new issue. The icon goes exactly where it is supposed to the top of the column on the right side of the screen but when I click it it opens another icon at the bottom of that column and is can not be relocated. If I grab it with the mouse and try to relocate it it just goes back to the bottom when I release it.

  14. thanx.
    In addition to making a backup you can also migrate the profile folder.
    Regarding profile folder it should be in ~/snap/firefox/common/
    You can copy that to the proper location ~/.mozilla/firefox/.
    Note that firefox should not be running.
    In the new installtion you can select profiles via firefox -P.

  15. A big “thank you’ for the solution for Mozilla in deb , since two day
    my brain was atomised in the terminal to find a solution :) , i’m a beginner with Linux.Today,
    with the help on your website, in just
    fifteen minutes : it’s ok.
    Have a good day!

Leave a comment

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.

Exit mobile version