How to Install The Latest Firefox (Non ESR) in Debian 11 Bullseye

Debian defaults to Firefox ESR focused on security fixes and policy updates. For those prefer the latest feature release, here are different ways to get it

Debian uses Firefox ESR, the Extended Support Release, as its default web browser. It mainly focuses on crash fixes, security fixes and policy updates, while receiving major updates with new features every 42 weeks.

It’s great for school or enterprise use. However, for personal computers or those prefer latest features, Mozilla provides the “Rapid release” channel with updates every month!

Here’s how to install the latest Firefox feature release in Debian 11 via 5 different ways:

  1. Firefox Flatpak package.
  2. using Debian Unstable repository.
  3. from Ubuntu 20.04 repository, while Debian unstable will also update glibc libraries.
  4. Firefox SNAP package.
  5. Linux portable tarball.

All the ways are either official packages from Mozilla or packaged by Debian / Ubuntu team. Also, they will NOT affect the existing Firefox ESR in your system. Choose the one that you prefer!!

Method 1: Install Firefox in Debian via Flatpak:

The Mozilla team provides three different Firefox packages for Linux: Flaptak, Snap, and Portable tarball.

The Flatpak is an universal package format works in most Linux systems. It runs in sandbox with a separate daemon. Firefox Flatpak receives updates automatically, though it takes a few hundreds MB more disk space for run-time libraries.

1. Firstly, open terminal from start menu and run command to install the daemon:

sudo apt install flatpak

2. Next, copy and paste the command below into terminal and run to install the web browser as well as run-time libraries:

flatpak install https://dl.flathub.org/repo/appstream/org.mozilla.firefox.flatpakref

The flatpak is present along with Firefox ESR, so you’ll see two Firefox icons in start menu after installation!

(Optional) How to Remove Firefox Flatpak:

In case you want to remove the package, run this command in terminal will do the trick:

flatpak uninstall --delete-data org.mozilla.firefox

As well, remove useless runtime libraries to free up disk space via command:

flatpak uninstall --unused

Method 2: Install Firefox via Debian Unstable Repository:

The Debian team builds the latest Firefox packages in Debian Unstable repository. I DON’T recommend this method because it will also update the Glibc and Libnss libraries that may cause stability issues! Though it’s still here for choice.

1. Firstly, open terminal from start menu and run command to add the Unstable repository to your system:

sudo sh -c 'echo "deb http://deb.debian.org/debian/ unstable main contrib non-free" >> /etc/apt/sources.list'

2. Next, run command to set a lower priority for packages from the Unstable repository:

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

The command will create a new rule file and open it via nano command line text editor. When it opens, paste the lines below:

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

After that, press Ctrl+X, then type y and hit Enter to save file.

3. Finally, refresh package cache and install the latest Firefox from unstable repository:

sudo apt update && sudo apt install -t unstable firefox

As mentioned, it will also update the glibc and libnss libraries that may break other packages. Do it at your own risk!!

How to Remove Debian Unstable repository:

To remove the unstable repository, open terminal and run command to edit the config file:

sudo nano /etc/apt/sources.list

When file opens in the terminal, remove the line in the end:

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

Finally, press Ctrl+X, type y and hit Enter to save it. Also run sudo apt update to refresh package cache. And, remove Firefox if want via command:

sudo apt remove --autoremove firefox

Method 3: Install Firefox from Ubuntu 20.04 Repository:

For those prefer native Firefox DEB package, I’ll recommend the Ubuntu 20.04 repository since it won’t affect any other packages in Debian 11. Like previous methods, it supports 64-bit modern PC, arm64/armhf (Apple Silicon, Raspberry Pi), ppc64el and s390x CPU architectures.

1.) Open terminal from start menu, and run command to add the 20.04 repository:

sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-updates main" >> /etc/apt/sources.list'

2.) As “third-party” repository, you need to run commands one by one to install the keyring so to trust the packages from it:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 871920D1991BC93C

The command will work though it warns that “apt-key is deprecated”.

NOTE: I'm not sure if the keys will change. But, if you get "NO PUBLIC key" error when running sudo apt update command, replace the key in above command with the missing one to get it.

3.) Set lower priority for packages from Ubuntu repository, except Firefox. To do so, run command to create and edit the config file:

sudo nano /etc/apt/preferences.d/99focal-updates

When the file opens as terminal output, paste the lines below:

Package: firefox*
Pin: release a=focal-updates
Pin-Priority: 500

Package: *
Pin: release a=focal-updates
Pin-Priority: 1

After that, press Ctrl+X, type y and hit Enter to save file.

4.) Finally, refresh package cache and install Firefox from Ubuntu repository:

sudo apt update
sudo apt install firefox

For language file, install firefox-locale-de (replace de) similar package via apt install command.

How to Remove Ubuntu repository:

Keeping the repository allows you to receive Firefox updates via system “Update Manager” (if any). However, you may remove it simply by running command to edit the sources file:

sudo nano /etc/apt/sources.list

And remove the line below (usually the last):

deb http://archive.ubuntu.com/ubuntu focal-updates main

Finally, press Ctrl+X, type y and hit Enter to save file. Also, run sudo apt update to update system package cache. And remove Firefox if you want via command:

sudo apt remove --autoremove firefox

Method 4: Install Firefox via SNAP:

The Mozilla team also provide Firefox package as the Linux universal SNAP. As competitor to Flatpak, the SNAP also runs in sandbox, receives updates automatically, and takes more disk spaces! And snap is developed by Canonical, the company behind Ubuntu.

1.) Firstly, install the SNAP daemon by running command in terminal:

sudo apt install snapd

2.) Next, enable and start snapd daemon via command:

sudo systemctl enable snapd
sudo systemctl start snapd

3.) Finally, install Firefox as snap via command:

sudo snap install firefox

Like normal apps, you may search for and open Firefox snap from start menu. Though you’ll see more than one app icons if ESR is still exist.

How to Remove Firefox SNAP:

To remove app, run command in terminal:

sudo snap remove --purge firefox

If you don’t use other Snap apps, you may also remove the daemon to free up disk space:

sudo apt remove --autoremove snapd

Method 5: Install Firefox Portable tarball:

Mozilla offers portable tarball packages for Linux 64-bit and 32-bit. Firstly, you may download it from the link below:

After downloaded the package, open terminal from start menu and run the command below will extract it into /opt directory:

sudo rm /opt/firefox
sudo tar -jxf ~/Downloads/firefox-*.tar.bz2 -C /opt/

The “rm” command will clear old Firefox tarball (if any) from /opt if you’ve done that before.

Finally, create an app shortcut by running command in terminal:

nano ~/.local/share/applications/firefox.desktop

Then copy the lines below and save it (press Ctrl+X, type y and hit Enter).

[Desktop Entry]
Name=Firefox Stable
Comment=Web Browser
Exec=/opt/firefox/firefox %u
Terminal=false
Type=Application
Icon=/opt/firefox/browser/chrome/icons/default/default128.png
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;
StartupNotify=true
Actions=Private;

[Desktop Action Private]
Exec=/opt/firefox/firefox –private-window %u
Name=Open in private mode

After that, you can search “Firefox Stable” to open the web browser from start menu.

Uninstall Firefox portable:

To uninstall it, simply remove both app shortcut file and source folder.

sudo rm /opt/firefox
rm ~/.local/share/applications/firefox.desktop

Summary:

In this tutorial, I’ve shown you how to install the latest Firefox (non-ESR) in 5 different ways! While the Flatpak is preferred via community, I’d recommend the Ubuntu 20.04 repository for those prefer classic DEB package. Though, 3 other methods are available for choices. And, them all will NOT affect the existing ESR package.

Hi, I'm Merilyn Ne, a computer geek working on Ubuntu Linux for many years and would like to write useful tips for beginners. Forgive me for language mistakes. I'm not a native speaker of English.
%d bloggers like this: