How To Install The Latest Firefox (Non-ESR) On Debian 10 Buster (Stable) Or Bullseye (Testing)

Latest regular non-ESR Firefox Debian Stable (Buster)

Debian Stable and Testing only have Firefox-ESR in their repositories. This article explains how to install the latest Firefox (stable but non-ESR) on Debian Stable (Buster) or Testing (Bullseye).

Firefox ESR, or Extended Support Release, is an official version of Firefox that's focused on security and stability instead of the latest features. During the extended cycle, no new features are added to Firefox ESR, with only high-risk / high-impact security vulnerabilities or major stability issues being fixed.

As such, Firefox ESR is primarily intended at organizations like universities, governments or businesses, as well as individuals who prefer stability to features, and a non-changing user interface between releases.

This article presents 2 3 ways of installing the latest non-ESR Firefox on Debian Stable (Buster) or Testing (Bullseye): from Flatpak / Flathub (available with Firefox 75; this was added to the article in a later edit), installing it from the Debian Unstable repositories (with apt pinning and instructions to revert the changes in case you need it) or manually downloading and including Firefox in the applications menu.

At the time I'm writing this article, the latest Firefox ESR is version 68 (68.2), while the latest regular Firefox release is at version 71.

It's worth noting that the regular Firefox (non-ESR) will use a new, separate profile. Your Firefox-ESR profile will remain on your system, and it will be loaded if you run Firefox ESR, but it won't be used by the regular Firefox version.

Option #1: Install the latest stable Firefox (non-ESR) on Debian using the Firefox flatpak package from Flathub


With Firefox 75, Mozilla's web browser has gained support for flatpak, and is available in the Flathub repository. This can be used across numerous Linux distributions, including any Debian release.

Note that Firefox installed from flatpak is sandboxed, which may cause some issues with local file access, and opening files with external applications, at least for now. Being sandboxed also offers better security though.

1. To install this Firefox package, the first thing to do is to install flatpak, if you haven't already:

sudo apt install flatpak

2. If you use GNOME Software app, you can also install the flatpak plugin for it (this allows browsing flatpak applications and updating them):

sudo apt install gnome-software-plugin-flatpak

3. Next, add the Flathub repository using:

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

4. At this point it's recommended you restart your system.

5. Now you can install the latest Firefox (non-ESR) on Debian by using:

flatpak install flathub org.mozilla.firefox

Option #2: Install the latest Firefox on Debian Stable or Testing by using the Debian Unstable repository


The Debian "unstable" (codenamed Sid) repository is like a rolling development version of Debian that will always be used as the unstable branch. It's where the packages go after their maintainer uploads them, and they are cleared for release by the FTP master. The name "unstable" doesn't necessarily mean that the packages are unstable, but that they are less tested, which is to be expected since they are new packages.

Debian 10 Buster (Stable) and Testing (Bullseye) only have Firefox ESR in their repositories, while Debian Unstable has both the latest normal Firefox version (non-ESR), and Firefox ESR.

The advantage of using Firefox installed this way over the other solution mentioned below is that you get to install Firefox maintained by Debian, which includes Debian-specific patches.

Using the instructions below we'll add the Debian Unstable repository in Debian Stable or Testing, then set a low pin priority for the Unstable repository so you can't automatically install packages from it unless you manually specify this. This way the normal Firefox version will only be installed or updated when you run the installation command mentioned below.

Other packages (except Firefox dependencies) from this Unstable repository are not automatically installed either, so you'll continue to use Debian Stable or Testing (depending on what you're using). This article also has instructions for completely undoing this.

1. Add the Debian Unstable repository on Debian 10 Buster (Stable) or Debian Bullseye (Testing).

Start by opening /etc/apt/sources.list as root with a text editor, like Nano:

sudo nano /etc/apt/sources.list

At the end of this file (don't modify anything) add the following line:

deb http://deb.debian.org/debian/ unstable main contrib non-free

After adding this, save the file and exit the text editor (if you're using Nano press Ctrl + O followed Enter to save the file, and exit Nano using Ctrl + X).

2. Set a low pin priority for the Debian Unstable repository so your system doesn't automatically install packages from it unless you manually specify this.

Create and open a file /etc/apt/preferences.d/99pin-unstable as root with a text editor, for example using Nano command line text editor:

sudo nano /etc/apt/preferences.d/99pin-unstable

Paste the following in this file:

Package: *
Pin: release a=stable
Pin-Priority: 900

Package: *
Pin: release a=unstable
Pin-Priority: 10

After adding this, save the file and exit the text editor (if you're using Nano press Ctrl + O, then press Enter to save the file, and exit using Ctrl + X).

3. Install the latest regular (non-ESR) Firefox on Debian 10 Buster (Stable) or Testing (Bullseye).

You can now install the latest normal Firefox on Debian 10 Buster (Stable) or Bullseye (Testing):

sudo apt update
sudo apt install -t unstable firefox

ATTENTION! The usual apt install firefox won't work due to the used pinning rules. Install it exactly as it's mentioned in this article -- using apt install -t unstable firefox.

For more information on apt pinning, check out this page from the Debian wiki.

In case you notice some incompatibility with having both the normal Firefox version and Firefox ESR installed on your system (I didn't notice any issues, but I thought I'd mention this just in case), you can remove Firefox ESR from your Debian installation:

sudo apt purge firefox-esr

You might also like: 3 Ways Of Installing Tor Browser On Linux

How to undo this and downgrade the packages installed from the Debian Unstable repository


Even though using the instructions from this article we've only installed Firefox from the Debian Unstable repository, Firefox itself also pulled in a few of its dependencies from Debian Unstable (required for it to work).

If you later change your mind and you want to undo the changes, you can downgrade the packages from the Debian Unstable repository to the version from Debian Stable / Testing.

To do this, open the /etc/apt/preferences.d/99pin-unstable file we've created under step 2, with a text editor like Nano:

sudo nano /etc/apt/preferences.d/99pin-unstable

In this file change the stable pin priority to 1001, and the unstable pin priority to -1, like this:

Package: *
Pin: release a=stable
Pin-Priority: 1001

Package: *
Pin release a=unstable
Pin-Priority: -1

Once you're done save the file and exit the text editor (if you're using Nano press Ctrl + O, then press Enter to save the file, and exit using Ctrl + X).

Next, run apt update and apt full-upgrade, and apt will downgrade all the packages from the Debian Unstable repository (and remove those that are only available in the Unstable repository):

sudo apt update
sudo apt full-upgrade

After this you may remove the /etc/apt/preferences.d/99pin-unstable file and the Debian Unstable apt repository from /etc/apt/sources.list.

Source for this (but I modified the repository and added undo instructions): u/kotajacob on Reddit.

Option #3: Manually install the latest normal Firefox on Debian Stable or Testing


Another option of having the latest regular (non-ESR) Firefox on Debian 10 Buster (Stable) or Bullseye (Testing) is to install it manually, by using the binaries provided by Mozilla. This has the advantage that it can automatically update itself, receiving the update as soon as Mozilla releases them.

1. Download Firefox for Linux (as provided by Mozilla) and extract it.

Head over to the Firefox download page and click the Download Now button to get the latest version of Firefox.

Extract the downloaded Linux Firefox build and move it to a folder on your system where your user has write permissions, so Firefox can auto-update itself. For example, you could move the Firefox folder into /opt/firefox, and change the /opt/firefox folder and /opt/firefox/firefox permissions to 755.

E.g. if you have the firefox folder extracted to your home directory, move it to /opt and change the /opt/firefox folder and /opt/firefox/firefox permissions to 755 (to allow it to auto-update) using:

sudo mv firefox /opt/
sudo chmod 755 /opt/firefox
sudo chmod 755 /opt/firefox/firefox

2. Add Firefox to the applications menu.

Next you'll want to add Firefox to your menu. On GTK-based desktop environments you can add applications to your menu by using MenuLibre. Install it on Debian using:

sudo apt install menulibre

On Qt / KDE based desktop environments you can add (and edit) applications to your menu with the help of KDE Menu Editor, which can be installed on Debian using:

sudo apt install kmenuedit

The instructions for adding a new application to the menu are very similar for both MenuLibre and KDE Menu Editor. Below I'll only explain the steps for MenuLibre.

Run MenuLibre (it may be shown as Menu Editor in the applications menu), click on the Internet category in the sidebar, then click the + button in the toolbar and choose Add Launcher:

MenuLibre add Firefox

An application launcher with empty (default) values will be created. Next, click on New Launcher near the top of this new empty launcher to edit its text, and change it to Firefox:

MenuLibre add Firefox

Next, click the icon (it's on the left-hand side of the "New Launcher" text), choose Browse Files... and browse for the Firefox icon by going to where you extracted Firefox, then in browser/chrome/icons/default, and choose the largest icon from there.

For example, if you extracted Firefox in /opt/firefox, the path to the icons would be: /opt/firefox/browser/chrome/icons/default).

Now you'll need to add the path to the Firefox executable to our new launcher. Click the folder icon next to the Command field in MenuLibre, and browse for the firefox executable. It should be in the folder where you extracted Firefox (e.g. if you have /opt/firefox as the folder where you extracted Firefox, the path to the Firefox executable would be /opt/firefox/firefox):

Menulibre add firefox

Next, if you see two extra categories called X-XFCE and X-Xfce-Toplevel, remove them by clicking on them, and then on the - (minus / hyphen) button:

Menulibre fix duplicate menu entries

If you have these two categories, you may get duplicate Firefox entries in your applications menu.

When you're done, remember to click the Save button from the MenuLibre toolbar to save and create your new Firefox launcher.

You should now find the regular Firefox version in your applications menu. Here's the latest Firefox (I have both the regular and ESR installed) in the applications menu on Debian 10.2 Buster (Stable):


It's worth noting that it's also possible to install the latest Firefox non-ESR on Debian by using the package from the Snap Store. But this has quite a few disadvantages and quirks: it may be slow to start, it doesn't respect the system theme in some cases (including the mouse cursor theme), on Debian it doesn't integrate in the applications menu and the executable is not automatically added to your $PATH (even after a system restart -- as observed in my test on Debian 10 Buster).