The most notable change you’ll notice in Ubuntu 22.04 is that the Firefox browser is no longer installed on the system as a traditional DEB package. Instead, it is now being installed as a Snap package.

From developer’s point of view, the eases the update process and ensures that all Ubuntu users are using the latest Firefox version for their security. But on the ground, users can easily observer that:

  • Firefox now takes around 7 seconds to launch for the first time, and around 2-3 seconds later on.
  • It is no longer possible to install GNOME Shell extensions from the website, because Firefox is now isolated from the rest of the system and hence chrome-gnome-shell native connector can not be accessed.
  • Some local services on the PC may not work with Firefox, for example KeePassX connector will no longer work on Ubuntu 22.04.

Overall, it is too much of a headache for the user and for what? Just for turning it a Snap for continuous updates? Sounds excessive.

In this very quick tutorial you’ll see how you can turn Firefox from a Snap package to a DEB package in Ubuntu 22.04, so that the issues above get fixed and you get a better browsing experience.

Step 1: Remove the Firefox Snap in Ubuntu 22.04

The very first basic step to do is to remove the old Snap version so that we don’t end up with two Firefox versions on our system.

Just apply the following command in the terminal, and watch the Snap getting snapped out of existence:

sudo snap remove firefox

Step 2: Add Mozilla’s PPA

Mozilla has its own Firefox repository on which it provides the latest versions of it as a DEB package. We just need to add this repository to our system in order to continue receiving updates for Firefox as a DEB package on Ubuntu 22.04.

Apply the following command in the terminal to add it:

sudo add-apt-repository ppa:mozillateam/ppa

Step 3: Adjust PPA Priority vs Snap

In software management, there is a concept known as “distribution channel priority”, which specifies which software source to fetch the software from in case the software exists in multiple distribution channels.

In our case, we already have the Firefox package coming from Ubuntu 22.04 as a transitional DEB package that installs the Snap version, and we also have the version coming from Mozilla’s PPA as a native DEB package, so which one should apt install?

In order to make the system understand our desire for the Mozilla’s PPA by default, we need to create a file at /etc/apt/preferences.d/mozilla-firefox and specify the priority we desire for that PPA.

We can do it with the following command (It will create the file and paste the contents automatically, so just copy and paste the whole thing as it is):

echo '
Package: *
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 1001
' | sudo tee /etc/apt/preferences.d/mozilla-firefox

Step 4: Install Firefox as a DEB Package on Ubuntu 22.04

Now everything is all set. We just need to install the new Firefox from Mozilla’s PPA using the following command:

sudo apt install firefox

And that’s it, you’ll see that you have the normal DEB version now:

Firefox as a Deb package on ubuntu 22.04 5

If you have any further comments or questions on this quick tutorial, then we will be happy to have them.

People reacted to this story.
Show comments Hide comments
Comments to: How to Install Firefox as a DEB Package on Ubuntu 22.04
  • August 20, 2022

    Question: What if I want to install development version (firefox-dev)?

  • October 28, 2022

    I followed this procedure twice, but firefox does not appear on my computer. No idea what’s the problem.

    • November 2, 2022

      Can you run “firefox” from the command line and see what it prints for you?

  • November 7, 2022

    This procedure works great, but Firefox eventually updates itself to the Snap version. I’ve got the priority set in that file, but it must be getting ignored. Is there another place I can override the Snap priority?


Write a response

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

Stay Informed

Keep up with the latest open source matters, away from blogspam, by following our social media accounts.