How to install Firefox on Ubuntu 22.04 or 24.04 without snap

Mozilla Firefox is a secure and default browser in almost all Linux distros including Ubuntu. However, the default method of installing Firefox on Ubuntu has been shifted to Snap. Even when we run the APT command it will connect and download the packages from the Snap repository. However, many users don’t want to use Snap instead they need a traditional method for installing this browser either due to performance issues or because of personal preference.

Therefore, in this article we go through three methods for installing Mozilla Firefox on Ubuntu but without using the SNAP instead apt package manager or downloading it directly from Mozilla. So, that the user can have more control over their installations and updates.

Step-by-step coverage of commands for setting up Firefox without snap:

Removing Firefox Snap Package

As FireFox comes as a default browser in Ubuntu, we first need to uninstall the default version installed on the system using the Snap packages. On your command terminal execute the following commands:

sudo snap remove firefox

Also run:

sudo apt remove --purge firefox*

#1st method using the official PPA repository:

Adding Mozilla PPA repository

Mozilla Developers officially offers a PPA repository for Ubuntu to install the latest version of the Firefox browser, so we can add that to get the browser via the APT package manager instead of SNAP. So, in your command terminal, execute the given command:

sudo add-apt-repository ppa:mozillateam/ppa

Also, run the system update command once:

sudo apt update && sudo apt upgrade 

Set the Mozilla Team PPA repo priority

We also need to change the priority of added Mozilla PPA repository otherwise even after adding the PPA repo of Mozilla when we run the APT command to install FireFox, the system will use the transitional package, which means, it will install the browser from Snap instead of adding the repo. Therefore, use the given command and increase the priority of Mozilla Firefox PPA.

Copy the whole command and paste it into your terminal, after that, press the Enter key:

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

Again run the system update:

sudo apt update

Installing FireFox without Snap

Finally, our Ubuntu system is ready to use APT and install the Firefox using the traditional way. Moreover, the PPA repo is maintained by the official team of FireFox developers, hence safe to use.

Now, let’s run the command to install FireFox on our Ubuntu 24.04, 20.04, or any other version you are using:

sudo apt install firefox
Install FireFox using APT

#2nd Method using the Mozilla APT repository

If you don’t want to use the PPA repository then can go for the official Mozilla APT repository to install FireFox but without the need for SNAP. However, those who already have added the PPA repository of Mozilla, first uninstall that using the command: sudo add-apt-repository --remove ppa:mozillateam/ppa

Add Mozilla APT repo

So. instead of using Snap or PPA to get Firefox, we can add manually the APT repository of Mozilla. The process is similar to adding a repo of any third-party open-source software that is not present in the Ubuntu official repo.

First, add the GPG key used to sign the packages of Firefox available through its APT repo:

sudo install -d -m 0755 /etc/apt/keyrings
wget -q -O- | sudo tee /etc/apt/keyrings/ > /dev/null

After adding the Key, add the repository ads

echo "deb [signed-by=/etc/apt/keyrings/] mozilla main" | sudo tee -a /etc/apt/sources.list.d/mozilla-apt.list > /dev/null

Also, set the priority of the added repository to skip the packages of Firefox from the SNAP.

echo '
Package: *
Pin: origin
Pin-Priority: 900
' | sudo tee /etc/apt/preferences.d/mozilla-apt

Run system update command:

sudo apt update

Get Firefox with APT

Now, use the regular APT for installing the Firefox browser, however, don’t forget to remove the existing instance of it that we have via Snap. We already have discussed the command to uninstall the existing Firefox in the previous method. Let’s now use the command to install it:

sudo apt install firefox

#3rd Method using the Tarball file

Download and setup the Tarball file

  1. Go to the Firefox download page and click the Download Now button.
  2. Open a terminal and switch to the location where you have saved the downloaded file which is generally the Downloads folder- For example:
    cd ~/Downloads
    Extract the contents of the downloaded file by typing:
    tar xjf firefox-*.tar.bz2
  3. Move the uncompressed Firefox folder to /opt:
    sudo mv firefox /opt
  4. Create a symlink to the Firefox executable:
    ln -s /opt/firefox/firefox /usr/local/bin/firefox
  5. Download a copy of the desktop file using the single given command for creating Firefox application shortcut:
    wget -P /usr/local/share/applications

Leave a Comment

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