Objective
Install Firefox 57, Quantum, on Debian Stretch
Distributions
Debian 9 Stretch
Requirements
A working Debian Stretch install with root privileges.
Difficulty
Easy
Conventions
- # – requires given linux commands to be executed with root privileges either directly as a root user or by use of
sudo
command - $ – requires given linux commands to be executed as a regular non-privileged user
Introduction
Firefox 57 is easily the best update to come to Firefox ever. Mozilla even named this release “Quantum” because of how dramatically the browser speed improved. Couple that with the complete redesign of Firefox’s UI, and you have a pretty dramatic change.
Thanks to Debian’s release schedule, it’s unlikely that Stretch will ever officially see Firefox 57. However, it is available in Sid. You won’t need to upgrade all the way to Sid to get it either. You only need to tell Debian to use Firefox from Sid.
Add the Sid Repos
You need to add the Sid repositories to Stretch in order to pull the Firefox package. Open /etc/apt/sources.list
with your favorite text editor and add in the following two lines.
deb http://ftp.us.debian.org/debian/ sid main deb-src http://ftp.us.debian.org/debian/ sid main
Save and exit.
Apt Pinning
Next, you’re going to need to tell Apt to prioritize all of the packages from Stretch over the ones from Sid, except for the ones you’ll need for Firefox.
If you don’t already have one, create a file at /etc/apt/preferences
In it, first place the rules to tell Apt to use Stretch over Sid.
Package: * Pin: release a=stable Pin-Priority: 1000 Package: * Pin: release a=unstable Pin-Priority: 2

There are three dependencies that you’ll need to pin in addition to Firefox. Set each of them up too.
Package: firefox Pin: release a=unstable Pin-Priority: 1001 Package: libfontconfig1 Pin: release a=unstable Pin-Priority: 1001 Package: fontconfig-config Pin: release a=unstable Pin-Priority: 1001 Package: libnss3 Pin: release a=unstable Pin-Priority: 1001
Once you have that, save and exit.
Install Firefox
Finally, you’re ready to install Firefox. You just need to update Apt, and tell Apt to install Firefox from Sid.
# apt update # apt install -t sid firefox

Apt will install Firefox alongside the ESR release. The two are independent, so you can keep both or remove one or the other.
Closing Thoughts
You now have Firefox 57 installed on Debian Stretch. As new versions of Firefox are released, you will continue to receive the updated versions from Sid. This way, you won’t miss out on the latest features coming from Firefox while still maintaining your stable Debian system.