Install Firefox on Debian from Mozilla’s APT repository when you want the current stable browser instead of Debian’s long-support Firefox ESR package. The Mozilla package keeps the normal firefox command, adds a desktop launcher, and updates through APT alongside the rest of your system.
Debian includes Firefox ESR as
firefox-esr. Use ESR when you prefer Debian’s default long-term browser branch. Use the Mozillafirefoxpackage when you need the current stable release. For preview builds, use the separate Firefox Beta on Debian guide instead of mixing beta commands into this stable setup.
Install Firefox on Debian
Check Your Debian Architecture
Mozilla’s current stable Firefox DEB package is available for amd64 and arm64. Check the system architecture before adding the repository.
dpkg --print-architecture
Continue with this repository method when the output is amd64 or arm64. If the output is i386, Mozilla’s stable firefox package is not published for that architecture; use Debian’s firefox-esr package or Mozilla’s tarball documentation.
Install Required Packages
Install the small tools needed to download the signing key, verify it, and refresh HTTPS package metadata.
sudo apt update
sudo apt install ca-certificates curl gpg
Add the Mozilla Signing Key
Download Mozilla’s repository signing key and store it as an APT-compatible keyring. The --yes option keeps the command safe to rerun if the key file already exists.
curl -fsSL https://packages.mozilla.org/apt/repo-signing-key.gpg | sudo gpg --dearmor --yes -o /usr/share/keyrings/packages.mozilla.org.gpg
Verify the fingerprint before trusting the repository.
gpg --show-keys --with-fingerprint /usr/share/keyrings/packages.mozilla.org.gpg | sed -n '1,2p'
pub rsa2048 2021-05-04 [SC]
35BA A0B3 3E9E B396 F59C A838 C0BA 5CE6 DC63 15A3
The fingerprint must match 35BA A0B3 3E9E B396 F59C A838 C0BA 5CE6 DC63 15A3.
Add the Mozilla APT Source
Create a DEB822 source file for Mozilla’s mozilla suite. This block checks the current architecture first and stops before writing the source file on unsupported systems.
(
arch=$(dpkg --print-architecture)
case "$arch" in
amd64|arm64) ;;
*)
printf 'Mozilla stable Firefox DEB packages are not published for %s.\n' "$arch"
printf 'Use firefox-esr or Mozilla tarball instructions instead.\n'
exit 1
;;
esac
printf '%s\n' \
'Types: deb' \
'URIs: https://packages.mozilla.org/apt' \
'Suites: mozilla' \
'Components: main' \
"Architectures: $arch" \
'Signed-By: /usr/share/keyrings/packages.mozilla.org.gpg' | sudo tee /etc/apt/sources.list.d/mozilla.sources > /dev/null
)
Confirm the file before refreshing package metadata. The architecture line should match your system, such as amd64 or arm64.
cat /etc/apt/sources.list.d/mozilla.sources
Types: deb URIs: https://packages.mozilla.org/apt Suites: mozilla Components: main Architectures: amd64 Signed-By: /usr/share/keyrings/packages.mozilla.org.gpg
Pin Mozilla Firefox Packages
Add an APT preference so Firefox packages from Mozilla’s repository outrank same-named packages from other enabled sources.
printf '%s\n' \
'Package: firefox*' \
'Pin: origin packages.mozilla.org' \
'Pin-Priority: 1000' | sudo tee /etc/apt/preferences.d/mozilla > /dev/null
Check the pin file content.
cat /etc/apt/preferences.d/mozilla
Package: firefox* Pin: origin packages.mozilla.org Pin-Priority: 1000
Refresh APT and Install Firefox
Refresh APT so the Mozilla repository becomes available, then install Firefox.
sudo apt update
sudo apt install firefox
Verify the Firefox Package
Confirm that APT sees Mozilla as the Firefox source and that the installed package is present.
apt-cache policy firefox
dpkg-query -W -f='${Package} ${db:Status-Abbrev} ${Version}\n' firefox
The policy output should show https://packages.mozilla.org/apt in the version table, and the dpkg-query status field should show ii.
Check the installed browser version and desktop launcher file.
firefox --version
dpkg -L firefox | grep '/applications/.*firefox.*\.desktop$'
The version command prints Mozilla Firefox followed by the installed stable version, and the package file list should include /usr/share/applications/firefox.desktop.
Install Firefox Language Packs
Mozilla provides optional language packs as firefox-l10n- packages. Search the package list when you need a locale-specific browser interface.
apt-cache search '^firefox-l10n-'
Install the package that matches your language code. For example, use French with firefox-l10n-fr.
sudo apt install firefox-l10n-fr
Replace fr with another available suffix, such as de, ja, or ko, when that locale appears in the search results.
Launch Firefox on Debian
Launch Firefox from the Terminal
Start Firefox from a terminal with the package command.
firefox
Launch Firefox from the Application Menu
On a GNOME desktop, open the application overview and start Firefox from the launcher.
- Click Activities in the top-left corner.
- Select Show Applications.
- Click the Firefox icon.

Update Firefox on Debian
Firefox updates through APT after the Mozilla repository is configured. Use the normal system update path for routine maintenance.
sudo apt update
sudo apt upgrade
To upgrade only Firefox without applying every pending system upgrade, use APT’s package-specific upgrade form.
sudo apt update
sudo apt install --only-upgrade firefox
If you installed a language pack, upgrade it by name as well.
sudo apt install --only-upgrade firefox-l10n-fr
Remove Firefox from Debian
Remove the Firefox Package
Remove the Mozilla Firefox package first. If you installed a language pack, remove that exact package name too.
sudo apt remove firefox
sudo apt remove firefox-l10n-fr
Clean up dependencies that are no longer required.
sudo apt autoremove
Remove the Mozilla APT Source
Remove the repository source, signing key, and APT preference only when no other Mozilla package from this repository should keep receiving updates.
sudo rm -f /etc/apt/sources.list.d/mozilla.sources /usr/share/keyrings/packages.mozilla.org.gpg /etc/apt/preferences.d/mozilla
sudo apt update
If Firefox Beta or another Mozilla repository package is installed from the same source, keep the repository files or remove only the stable
firefoxpackage.
Verify Firefox Removal
Check the installed state and remaining package candidates.
dpkg-query -W -f='${Package} ${db:Status-Abbrev} ${Version}\n' firefox 2>/dev/null || true
apt-cache policy firefox
After repository cleanup, apt-cache policy firefox should no longer show packages.mozilla.org. If it still appears, another source file still points at Mozilla’s repository.
Remove Firefox User Data
Firefox profile data stays in your home directory after package removal. Delete it only when you want to remove bookmarks, history, saved passwords, extensions, and cache files from this Linux account.
Warning: These commands permanently delete Firefox profile data for your user. Export bookmarks and back up anything important before running them.
rm -rf ~/.mozilla/firefox
rm -rf ~/.cache/mozilla/firefox
Troubleshoot Firefox on Debian
APT Reports a Duplicate Mozilla Source
Use only one Mozilla APT source. Older extrepo-based setups can point at the same repository as the manual mozilla.sources file, and duplicate entries can cause APT source or Signed-By conflicts.
grep -R "packages.mozilla.org/apt" /etc/apt/sources.list.d
If you see both extrepo_mozilla.sources and mozilla.sources, keep the manual Mozilla source created earlier and disable the extrepo entry.
if command -v extrepo >/dev/null 2>&1; then
sudo extrepo disable mozilla
fi
sudo rm -f /etc/apt/sources.list.d/extrepo_mozilla.sources /var/lib/extrepo/keys/mozilla.asc
sudo apt update
For broader extrepo cleanup patterns, use the Debian third-party APT repository management guide.
APT Cannot Verify the Mozilla Repository
A keyring error usually means the Mozilla key file is missing, corrupt, or written in a format APT cannot use.
Err:4 https://packages.mozilla.org/apt mozilla InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C0BA5CE6DC6315A3
Recreate the keyring, verify the fingerprint, and refresh APT.
curl -fsSL https://packages.mozilla.org/apt/repo-signing-key.gpg | sudo gpg --dearmor --yes -o /usr/share/keyrings/packages.mozilla.org.gpg
gpg --show-keys --with-fingerprint /usr/share/keyrings/packages.mozilla.org.gpg | sed -n '1,2p'
sudo apt update
Firefox Has No Installation Candidate
If APT cannot find firefox, check the architecture and repository file first.
dpkg --print-architecture
cat /etc/apt/sources.list.d/mozilla.sources
apt-cache policy firefox
On amd64 or arm64, the source file should contain URIs: https://packages.mozilla.org/apt, Suites: mozilla, and an Architectures: line matching the host architecture. On i386, use firefox-esr from Debian instead because Mozilla’s stable firefox DEB package is not published for that architecture.
Related Firefox and Debian Guides
- Mozilla Linux installation documentation: Official source for Mozilla’s Linux package methods, language packs, tarball instructions, and profile migration notes.
- Firefox official website: Release information, downloads, and browser feature details.
- Install Firefox Beta on Debian: Use the preview channel when you need pre-release Firefox builds.
- Install Brave Browser on Debian: Add a Chromium-based browser with its own vendor repository.
- Install Chromium Browser on Debian: Use Debian’s Chromium package when you want an open-source Chromium-family browser.
Conclusion
Firefox is now installed on Debian from Mozilla’s APT repository, with the signing key, DEB822 source, package pin, update path, launcher check, and cleanup steps handled in one source layout. Keep Debian’s firefox-esr when long-term stability matters more than current stable releases, and keep preview channels in their own setup so stable and beta package sources stay easy to audit.


Formatting tips for your comment
You can use basic HTML to format your comment. Useful tags currently allowed in published comments:
<code>command</code>command<strong>bold</strong><em>italic</em><blockquote>quote</blockquote>