How to Install Firefox Nightly in Debian & Ubuntu via New Official Repository

This is a step by step beginners tutorial shows how to install Firefox Nightly in Debian 12, Ubuntu 22.04, Ubuntu 20.04, Ubuntu 23.10, Linux Mint 21, via the new official apt repository.

Firefox Nightly is the bleeding edge version of the web browser that updates twice a day. It contains features that are still in developments months or even years before they become mainstream.

Like the ‘Stable’ release series, the Nightly build is available as Snap (edge channel) and portable tarball for Linux users.

Just one day ago on Monday, Mozilla announced APT repository as a new official way to get Firefox Nightly for Debian/Ubuntu based systems.

With it, user can install the edge version of the browser in .deb package format, and keep it up-to-date via system package manager (e.g., Software Updater and Update Manager).

Firefox Nightly
NOTE: Firefox Nightly is available for testing purpose! Don't install it on production machine.

Step 1: Setup the Apt Repository Key

1.) Firstly, launch terminal either by searching from start/applications menu or by pressing Ctrl+Alt+T (for Ubuntu) on keyboard.

2.) When terminal opens, run command:

wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | gpg --dearmor | sudo tee /etc/apt/keyrings/packages.mozilla.org.gpg > /dev/null

In case ‘/etc/apt/keyrings’ directory does not exist, run sudo mkdir -p /etc/apt/keyrings first to try creating it.

This command will download the key file from Mozilla website using wget command. Then, dearmor so it will be more secure un-readable code. Finally, save it as packages.mozilla.org.gpg file under “/etc/apt/keyrings” directory.

Setup Mozilla Apt Repository Key
Tips: the official guide told to save key to '/etc/apt/trusted.gpg.d', which is deprecated by Debian's new policy due to security reason!

Step 2: Add the APT repository source

Now, create the source config file and add the source line into your system. This can be done via 2 ways: .list, or .sources file. Choose either way that you prefer.

Method 1: use .list file

The classic way to add 3rd party repository in Debian/Ubuntu, is adding .list file into ‘/etc/apt/sources.list.d’ directory.

1.) Also, launch terminal. Then, run command to create & edit a .list file:

sudo gedit /etc/apt/sources.list.d/mozilla.list

Depends on your OS edition, replace gedit with gnome-text-editor for Ubuntu 23.10, Debian GNOME, or mousepad for XFCE Desktop, kate without sudo for KDE, or nano command line text editor that works for most Linux.

2.) When the file opens, add the single line below and save it:

deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.gpg] https://packages.mozilla.org/apt mozilla main

For nano text editor, press Ctrl+X, hit Y, then Enter to save the file.

Method 2: use .sources file

Ubuntu now prefer the deb822-formatted .sources files, which is also used as default for PPAs in Ubuntu 23.10.

1.) First, launch terminal from start/applications menu or ‘Activities’ overview depends on your desktop environment.

When terminal opens, run command to create & edit the source file:

sudo gedit /etc/apt/sources.list.d/mozilla.sources

Also, replace gedit depends on your system editor and desktop environment, or use nano that works in most Linux.

2.) When the file opens, add following lines and save it.

Types: deb
URIs: https://packages.mozilla.org/apt
Suites: mozilla
Components: main
Signed-By: /etc/apt/keyrings/packages.mozilla.org.gpg

For nano text editor, press Ctrl+X, hit Y, then Enter to save the file.

Step 3: Install & Update Firefox Nightly

After setting up the key and source file, run command in terminal to refresh system package cache:

sudo apt update

Finally, install the edge version of Firefox browser via command:

sudo apt install firefox-nightly

For non-English user, you can replace the last command with:

sudo apt install firefox-nightly-l10n-XX

Replace XX with your language short code. Or, type sudo apt install firefox-nightly-l10n then hit Enter to show available choices.

When done, launch it from start/applications menu or ‘Activities’ overview and enjoy!

To update the package, either use system Update Manager / Software Updater, or run the last 2 commands repeatly.

Uninstall

To uninstall the apt source repository, launch terminal and run command to delete the corresponding config file:

sudo rm /etc/apt/sources.list.d/mozilla.*

Also delete the key file by running command:

sudo rm /etc/apt/keyrings/packages.mozilla.org.gpg

To uninstall the web browser package, use command:

sudo apt remove --autoremove firefox-nightly*

That’s all. Enjoy!

Hi, I'm Ji, the creator of Ubuntuhandbook.org. Now, I'm also writing partly in this web site.