Debian is the most stable, and one of the oldest GNU/Linux distributions.
However, its conservative approach means it often includes older software versions.
Debian by default is using Firefox ESR (i.e. the Extended Support Release).
This Firefox release is few versions older than the mainstream Firefox release used by other distributions (i.e. Ubuntu, Fedora, OpenSuse, Arch etc...)
Nevertheless it's possible to install the mainstream Firefox on Debian without using Flatpak, Snap or AppImage package formats, with few terminal commands
Install wget
Wget is a command line utility to download files from a remote location.
This utility is used to download the Mozilla Repo's key.
Check if wget is installed by typing:
which wget
if the output is the following, you already have it installed, so you can skip to the next step.
/usr/bin/wget
if the output is different you need to install wget, by typing:
sudo apt install wget
Remove the old Firefox version
sudo apt purge firefox-esr
Import Mozilla Repo’s Key
The Mozilla APT repository signing key must be added first.
This is essential because it confirms that the software to be installed is genuinely from Mozilla.
Copy and paste the following line in your terminal.
wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null
Import the key with:
gpg -n -q --import --import-options import-show /etc/apt/keyrings/packages.mozilla.org.asc | awk '/pub/{getline; gsub(/^ +| +$/,""); print "\n"$0"\n"}'
Add the Firefox Repo to your Debian 12 System
Now, it’s time to add Mozilla’s official repository, which hosts the DEB packages we need to install Firefox, to our Bookworm system.
Type the following:
echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | sudo tee -a /etc/apt/sources.list.d/mozilla.list > /dev/null
Prioritize Mozilla's repo.
In Debian, the APT package manager handles packages, including installing, updating, and removing software.
But sometimes, multiple repositories are added to your system that provide different versions of the same package, as is the case with Firefox.
In other words, the browser is now available from the newly added Mozilla repository plus in the Debian official repository (Firefox ESR)
So, if you try to install the browser now, the system will fetch it from the Debian repository, and you’ll end up with the ESR version (again) installed on your system.
In order to avoid this we need to prioritize the Mozilla's repo we just added with this:
echo '
Package: *
Pin: origin packages.mozilla.org
Pin-Priority: 1000
' | sudo tee /etc/apt/preferences.d/mozilla
Install Firefox from Mozilla’s Repo on Debian 12 Bookworm
Now that:
the signing key has been added
the Mozilla's repo is on our system
APT package manager has been instructed to give priority to the Mozilla's repo
it's time to install the actual browser by typing:
sudo apt install firefox
Conclusion
You can now launch Firefox from your menu, or with your keybindings.
With the latest Firefox installed, you can enjoy a faster, more secure, and feature-rich browsing experience on your Debian 12 system.
Comments