Updating Firefox on Debian Stable: 5 Methods to Try
15:08, 23.10.2023
Upon opting for and installing Debian onto your device it’s highly probable that one of the primary things you’ll be eager to do is to explore the World Wide Web. However, during your first attempt you’ll face a but. To explore the world wide any user needs a browser. If you are a dedicated preferer of Mozilla Firefox, there is already a preinstalled version of Firefox on it. The but is that it’s ESR, a stable version with an extended support term, that is updated with significantly lower frequency. In the event you want to benefit from the freshest things added to the Stable version, you’ll have to update it manually — which can be a bit of a tricky process. Therefore, today we’re dedicating this material to some 5 methods to install Firefox Stable on Debian Stable.
What’s the matter with ESR?
ESR is the version for companies and generally, users who prefer stability over the latest functionality. If you, on the contrary, want to enjoy the most newly added features, you should install the Stable version, and read further for this purpose.
Method 1: Installation through flatpak package from Flathub
Flatpak is a commonly used utility used to deploy software in a sandbox environment. The latter offers both certain advantages and disadvantages: worse compatibility with certain files on certain occasions VS. increased security.
Step 1. Install flatpak:
sudo apt install flatpak
Step 2. Install flatpak plugin for GNOME (for GNOME users)
sudo apt install gnome-software-plugin-flatpak
Step 3. Add the Flathub repository
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Step 4. Reboot the device (non-obligatory, but recommended)
Step 5. Install Firefox
flatpak install flathub org.mozilla.firefox
Method 2: Installation through the Debian Unstable repository
Like many solutions of different kinds, Debian has its “unstable” version – a transitional version that is newer but not sufficiently tested yet and is yet to be approved. What is special about Debian Unstable is that, unlike Debian Stable, it contains not exclusively Firefox ESR, but also the here desired Firefox Stable version.
Among other things, what’s good about this particular version is that it is already specially pre-patched for Debian, providing better compatibility.
After the procedure described below, you’ll have to execute the corresponding installation line each time a new Firefox update is released, as you can’t set it up as an automatic process.
Step 1. Add Debian Unstable repository to your Debian version
Open /etc/apt/sources.list (as root) with any program used for editing text files with code (here and further we use Nano):
sudo nano /etc/apt/sources.list
At the bottom of the text insert:
deb http://deb.debian.org/debian/ unstable main contrib non-free
Save changes and leave the program
Step 2. Enable a low pin priority for Debian Unstable
Low pin priority is needed to omit the automatic installation of packages from Debian Unstable.
First, create and edit (as root) a /etc/apt/preferences.d/99pin-unstable file.
sudo nano /etc/apt/preferences.d/99pin-unstable
Insert:
Package: *
Pin: release a=stable
Pin-Priority: 900
Package: *
Pin: release a=unstable
Pin-Priority: 10
Save and leave the program.
3. Install Firefox Stable
sudo apt update
sudo apt install -t unstable firefox
Make sure to use apt install -t unstable firefox and not the habitual command. Due to low pin priority, apt install firefox won’t work.
Rollback to the original packages
Firefox ESR can be also restored with Debian Unstable packages removed, for example, in the event you discover some bad compatibility (although they haven’t been found yet:
sudo apt purge firefox-esr
If for this or that reason, you want to recoil the changes applied and undo what was edited, the whole thing can be downgraded back.
First, access the aforementioned /etc/apt/preferences.d/99pin-unstable with the preferred text editing program.
stable pin priority is to be set to 1001 whereas the unstable one to -1:
Package: *
Pin: release a=stable
Pin-Priority: 1001
Package: *
Pin release a=unstable
Pin-Priority: -1
Save and leave the app.
Now, run:
sudo apt update
sudo apt full-upgrade
This will set the whole thing to its original state.
The /etc/apt/preferences.d/99pin-unstable file as well as Debian Unstable apt repository, as no more needed, can be removed from /etc/apt/sources.list.
Method 3. Manual installation
The third option is the manual installation through binaries from Mozilla itself. What’s good about this one is the option to configure (finally) the automatic updates.
Step 1. Download the installation file
Download the Firefox installation files from the official website.
Extract the files from the article into a folder. The latter has to have write permissions (for auto updates). For this, the folder’s permissions are to be changed to 755. Example:
sudo mv firefox /opt/
sudo chmod 755 /opt/firefox
sudo chmod 755 /opt/firefox/firefox
Step 2. Add Firefox to your apps menu
To add the browser to your apps menu. One way to do it is to use MenuLibre:
sudo apt install menulibre
Another option is KDE Menu Editor (for Qt/KDE desktop env.):
sudo apt install kmenuedit
First, run MenuLibre. Click on the “Internet”, then “+”, then “add launcher”.
Change the launcher name to what you need (in our case most likely “Firefox”).
Click on the icon from the left of the name you just edited, go to the path you’ve chosen for Firefox and find the corresponding icon at browser/chrome/icons/default.
Edit the “command” line by adding the path to the firefox.exe.
Remove X-XFCE and X-Xfce-Toplevel if they appear to omit the appearance of two Firefoxes in your menu.
Save changes.
Method 4. Installation through Snap
Another way is to install Firefox through the Snapshop by using the following commands:
sudo apt update
sudo apt install snapd
sudo snap install firefox
However, this version may launch slower and has a worse integration in a variety of cases.
Method 5. Installation through Debian Multimedia Repository
The last method for today is by using The Debian Multimedia repository, a service that provides Debian with additional multimedia support.
First, add Debian Multimedia repository:
sudo apt install software-properties-common
sudo add-apt-repository "deb http://www.deb-multimedia.org stable main non-free"
Update package lists:
sudo apt update
Install Firefox from the repository:
sudo apt install firefox
Conclusion
These have been 5 common methods to install Firefox stable on Debian stable. Use the one that you find the most convenient for you. Good luck with your digital undertakings, thank you for reading!