How to Install a Non-Snap/.deb Version of Firefox on Ubuntu 22.04

Having issues with Snap based Firefox? Then read the mentioned steps to ditch the Snap version of Firefox for the classic/regular Firefox on your Ubuntu 22.04 system.

One of the drawbacks of coming to Ubuntu 22.04 is that you will find Firefox as snap packages, and because of that, some of the integration doesn’t work well with the system.

And a really bad thing I found is that when you try to uninstall and reinstall Firefox using the apt command, you will find that it re-installs the snap version instead of the conventional version.

However, you can ditch the snap version of Firefox by getting it installed on your system by taking the steps to install Firefox from a tar package, which include extracting the file and putting it in the right place.

or install Firefox from the Mozilla PPA file, which takes a little more work but gives you the regular version of Firefox on your system without any snap-related problems.”

So let me show you how to install Firefox without using Snap on Ubuntu 22.04 by removing the Snap version of Firefox and then downloading the regular version from the Mozilla website or using the Mozilla PPA file.

Uninstall Snap Firefox

I don’t think you will need Snap based Firefox if you are installing classic Firefox on your machine, so it’s better to first get rid of the Snap-based Firefox to avoid any conflicts or confusion.

To remove Firefox, open your system terminal and copy-paste the following code, which uninstalls Firefox from your machine:

$ sudo snap remove firefox

If you are unsure about using the terminal, you can also use the software center or package manager to remove Firefox.

Methods for Installing Classic/Regular Stable Firefox on Ubuntu

Once you’ve uninstalled Firefox, you can use one of the following methods to put classic Firefox (without snap) on Ubuntu 22.04 LTS:

  • Install Firefox from the tar file: Convenient way to install classic Firefox by extracting and moving the file to its respective location to launch from anywhere, but the drawback is you need to manually update the firefox.
  • Install Firefox from the PPA: It is similar to installing applications from the repository; you just need to add the PPA, update your system, and then install Firefox.

Install Firefox from tar file

I found one of the best ways to install Firefox on Ubuntu is to get the tar package from the official website, which needs to be extracted and a few configurations made before it can be launched.

However, there is one drawback to this method: you have to manually download and move the latest package to the /opt/ directory, which I don’t think is a big deal, don’t you think?

Step 01Download the tar file

So first, I would ask you to get the latest version of Mozilla Firefox from the official sites by clicking the link below, which will redirect you to the download page.

Step 2Extract and Move file /opt

Once you have downloaded the file, you need to extract the tar file to a safe location like /opt so you don’t end up removing Firefox files while cleaning up your download directory.

I hope your terminal is up; if not, then please bring it up and execute the following command to extract firefox-110.0.1.tar.bz2 from ~/Downloads to the /opt directory.

$ sudo tar xjvf ~/Downloads/firefox-*.tar.bz2 -C /opt/

If you have downloaded the firefox-xxx.x.x.tar.bz2 file to any other location, then make sure to replace with the actual path before running the above command.

After that, you need to create a soft link for /opt/firefox/firefox to /usr/local/bin/firefox+ so you can anytime call firefox from your terminal window.

$ sudo ln -s /opt/firefox/firefox /usr/local/bin/firefox

Now you can start Firefox from the terminal, but it is not convenient enough to start it every time from the terminal, right? Then let’s see how you can add a Firefox icon to the App Menu.

Step 3Create a desktop icon

To create a desktop icon for Firefox, you can use the below command, which will download the firefox.desktop file, which is responsible for showing the application icon in the app menu in Linux distributions.

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

Once you are done with the above steps, you can look for Firefox in the application menu.

Install Firefox from the Mozillateam/PPA

With the above method, you will be able to install Firefox in less than five minutes, but the slight problem is that you need to manually update and move files to the corresponding directory, which I don’t think many will like to do.

If you are also one of them, you can use the following method, where I’ll show you how to add a PPA to install non snap Firefox that is provided by Rico Tzschichholz.

Here are some steps that you can follow to install Firefox using the PPA:

Step 01 Add PPA Information

As I said, you need to add mozillateam/ppa to install regular Firefox from your system command, and to add this PPA, you can use the following command in your terminal:

$ sudo add-apt-repository ppa:mozillateam/ppa
Added mozilla team ppa
Added mozillateam/ppa

Step 2Set Priorty to Mozillateam/PPA

After adding PPA, your work is not over yet. You need to make a few more changes, like setting up priority, otherwise, if you try to install Firefox right now, you will get the snap-based version.

To avoid this, you need to run the following lines of code, which will ensure that the apt command should install a classic Firefox over the snap.

$ echo "Package: *
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 900 " | sudo tee /etc/apt/preferences.d/99mozillateam

And before heading to the next section, let’s check whether the changes have been reflected or not by running the next line of command:

$ apt policy firefox

As you can see, the priority number has been changed from 500 to 900, which means first priority will be given to the mozillateam/ppa over other sources.

Priority Changes for ppa
Priority Changes

Now you’re almost done with the steps, except for the final one.

Step 3Unattended upgrades for future releases

Next, you need to run the following command to automatically get the latest release of Mozilla Firefox to your system without requiring any manual intervention.

echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' |
sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox

Step 4Install Firefox

After all the effort, let’s run the final command to install Firefox on your Ubuntu 22.04.

$ sudo apt install firefox

Once the installation is over, you will find Firefox in the application menu, so you can easily launch it and start browsing the web with the non-snap version of Mozilla Firefox.

Install Firefox without snap using script

If you don’t want to perform all steps on your own, then you can use the following script that I found on Github, which will do all the above-mentioned tasks one by one.

#!/bin/env bash

sudo snap remove firefox
sudo add-apt-repository ppa:mozillateam/ppa

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

echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox

sudo apt install firefox

# consider the ramifications of the following line and uncomment if you want
# mv ~/snap/firefox/common/.mozilla/firefox ~/.mozilla/

To use the script, you can modify and run the file in your system, but if you are okay with the above script, then run the below command, which will download and run the script in your system.

$ curl -sL https://gist.githubusercontent.com/jc00ke/4dd8c7afa79bd78412f93bce09a5de84/raw/6d84f9944e8a294a7754e5e0e92e0dfd2acebeb3/firefox-snap-to-deb.sh | sudo bash

Wait for the script to complete its assigned task, and once it is done, run Firefox from the activities menu or from the application menu.

Firefox Interface
Firefox Interface

Wrap up

That’s all for this article, where you learned how to install Firefox without Snap, and now you are able to enjoy the benefits of using Firefox without Snap’s limitations.

Anyway, we have also covered an article on how you can manually install extensions from the command line, which is another great way to install extensions on GNOME.

If you liked the article, then don’t forget to share this knowledge with your friends and family, who may also benefit from it.

As you know, sharing is caring 🤗

0 0 votes
Article Rating
Subscribe
Notify of
guest
3 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
InnocentBystander
InnocentBystander
1 year ago

I don’t mind the slow start of snap apps. Because it’s a one time start and I rarely reboot. I am mildly annoyed by the snap apps because they have a different update life cycle. Works OK with Gnome. However with Kubuntu 22.04, they are unbearable, at EACH update, all snaps app shortcuts are lost in the taskbar. Firefox settings is reset.

I began to switch all my apps to using apt package manager or install manually from *.deb, like IntelliJ or Bitwarden.

I can’t believe I am saying this. Because I started out as “no big deal with snaps”. Now I am going to ditch Ubuntu and switch to Debian. Worked perfect with Debian 12 Testing on one machine at home. Soon all my computers will be converted from Ubuntu to Debian.

bkw777
bkw777
1 year ago

Mozillateam PPA now installs a snap as well.
If you want firefox without a snap on ubuntu today, the most convenient is a fork like librewolf.