How to Install Firefox on Debian

Install Firefox on Debian 11, 12, or 13 with firefox-esr from Debian, the official Mozilla APT repository for the latest release, Snap, Flatpak, or a .tar.xz from firefox.com. Verify versions, set the default browser, update, and uninstall without breaking firefox-esr.

Published

Updated

Read time 6 min read

Reviewed byDeepak Prasad

How to Install Firefox on Debian

Mozilla Firefox is the default browser on many Debian desktop installs, but the packaging story changed: current stable releases ship firefox-esr (Extended Support Release) from Debian main, while the rolling firefox package lives on Mozilla’s APT repository—not in deb.debian.org alone.

This guide covers install Firefox on Debian for Debian 11 (Bullseye), 12 (Bookworm), and 13 (Trixie): firefox-esr from Debian, Mozilla APT for the latest release, Snap, Flatpak, and a .tar.xz from firefox.com, plus updates and uninstall. I ran these paths on Debian 13 and kept real terminal output below. For Google’s browser, see install Google Chrome on Debian.

Tested on: Debian 13 (trixie); kernel 6.12.94+deb13-amd64; amd64; firefox-esr 140.12.0esr (Debian); firefox 152.0.3 (Mozilla APT).

NOTE
Pick one primary update channel for day-to-day use (firefox-esr, Mozilla firefox, Snap, or Flatpak). You can install firefox-esr and Mozilla firefox together—they are separate packages—but only one should own /usr/bin/firefox for a predictable firefox command.

Choose an install method

Method Best for Version on test host
apt install firefox-esr Default Debian path; security team updates 140.12.0esr
Mozilla APT (firefox) Latest release via apt 152.0.3
Snap (snapcraft.io/firefox) Sandboxed install when snapd is already in use 152.0.3-1 stable
Flatpak (org.mozilla.firefox) Flathub sandbox without Snap 152.0.3
.tar.xz from Mozilla No repo; unpack under /opt or $HOME 152.0.3 (~85 MB)

On Trixie, apt install firefox without the Mozilla repo fails—use firefox-esr or add Mozilla’s repository first.


Check what is already installed

bash
. /etc/os-release && echo "$PRETTY_NAME"
firefox --version 2>/dev/null || echo "firefox: not installed"
which firefox 2>/dev/null
dpkg -l firefox firefox-esr 2>/dev/null | grep ^ii
apt-cache policy firefox firefox-esr | head -16

Before adding Mozilla’s repo on a clean trixie desktop:

text
Debian GNU/Linux 13 (trixie)
Mozilla Firefox 140.12.0esr
/usr/bin/firefox
ii  firefox-esr  140.12.0esr-1~deb13u1  amd64  Mozilla Firefox web browser - ESR
firefox:
  Candidate: (none)
firefox-esr:
  Installed: 140.12.0esr-1~deb13u1
  Candidate: 140.12.0esr-1~deb13u1

The firefox command on Debian often points at ESR even though the package name is firefox-esr (Debian Wiki — Firefox).


firefox-esr is maintained in Debian main with security support—no third-party repository:

bash
sudo apt update
sudo apt install -y firefox-esr
firefox --version
text
Mozilla Firefox 140.12.0esr

Optional language packs: apt-cache search firefox-esr-l10n | head -5 (for example firefox-esr-l10n-de).

Desktop entry:

bash
ls /usr/share/applications/firefox-esr.desktop
text
/usr/share/applications/firefox-esr.desktop

This path matches what most Debian Firefox documentation describes for stable suites.


Install the latest Firefox from Mozilla APT

Mozilla publishes .deb packages and an official APT source (install Firefox on Linux, Nightly deb announcement). Works on Bullseye, Bookworm, and Trixie when sudo is available.

Add the signing key and repository

bash
sudo apt install -y wget gpg
sudo install -d -m 0755 /etc/apt/keyrings
wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- \
  | sudo tee /etc/apt/keyrings/packages.mozilla.org.gpg > /dev/null
echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.gpg] https://packages.mozilla.org/apt mozilla main" \
  | sudo tee /etc/apt/sources.list.d/mozilla.list
sudo apt update
apt-cache policy firefox | head -10
text
deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.gpg] https://packages.mozilla.org/apt mozilla main
firefox:
  Candidate: 152.0.3~build1
     152.0.3~build1 500
        500 https://packages.mozilla.org/apt mozilla/main amd64 Packages

Install the release package

bash
sudo apt install -y firefox
firefox --version
dpkg -l firefox firefox-esr | grep ^ii
text
Mozilla Firefox 152.0.3
ii  firefox      152.0.3~build1        amd64  Mozilla Firefox
ii  firefox-esr  140.12.0esr-1~deb13u1 amd64  Mozilla Firefox web browser - ESR

Both packages can coexist. firefox-esr remains available as its own binary:

bash
firefox-esr --version
text
Mozilla Firefox 140.12.0esr
IMPORTANT
packages.mozilla.org is maintained by Mozilla, not the Debian project—review your policy before adding it on production systems, the same way you would for any external APT source.

Install Firefox with Snap

Snap ships a Mozilla-published build (Firefox on Snapcraft):

bash
sudo apt install -y snapd
sudo snap install firefox
snap info firefox | head -14
text
name:      firefox
summary:   Mozilla Firefox web browser
publisher: Mozilla**
latest/stable:    152.0.3-1     2026-06-25 (8568) 265MB -
esr/stable:       140.12.0esr-1 2026-06-16 (8472) 258MB -

Launch with firefox from the Snap menu entry, or snap run firefox. Use the esr/stable channel when you want ESR inside Snap: sudo snap install firefox --channel=esr/stable.


Install Firefox with Flatpak

When Flathub is configured:

bash
flatpak search firefox | head -3
sudo flatpak install -y flathub org.mozilla.firefox
flatpak run org.mozilla.firefox --version 2>/dev/null || true
text
Firefox	Fast, Private & Safe Web Browser	org.mozilla.firefox	152.0.3	stable	flathub

Flatpak updates independently of apt: flatpak update org.mozilla.firefox.


Install Firefox from a release archive

Download the current Linux x86_64 build without adding a repository (firefox.com Linux download):

bash
curl -sI 'https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US' | grep -iE '^(location|content-length)'
text
location: https://download-installer.cdn.mozilla.net/pub/firefox/releases/152.0.3/linux-x86_64/en-US/firefox-152.0.3.tar.xz
content-length: 84825836

Extract and run:

bash
cd /tmp
wget -q --show-progress 'https://download-installer.cdn.mozilla.net/pub/firefox/releases/152.0.3/linux-x86_64/en-US/firefox-152.0.3.tar.xz'
tar -xf firefox-152.0.3.tar.xz
./firefox/firefox --version
text
Mozilla Firefox 152.0.3

Move to a permanent path if desired:

bash
sudo mv firefox /opt/firefox
sudo ln -sf /opt/firefox/firefox /usr/local/bin/firefox-portable

Use firefox-portable (or the full path) so you do not overwrite /usr/bin/firefox from firefox-esr or Mozilla firefox.


Set the default browser

After installing a .deb build:

bash
xdg-settings get default-web-browser
xdg-settings set default-web-browser firefox.desktop
# or for ESR only:
# xdg-settings set default-web-browser firefox-esr.desktop

GNOME and KDE expose the same choice under Settings → Default applications.


Update Firefox

Channel Command
firefox-esr (Debian) sudo apt update && sudo apt install --only-upgrade firefox-esr
firefox (Mozilla APT) sudo apt update && sudo apt install --only-upgrade firefox
Snap sudo snap refresh firefox
Flatpak flatpak update org.mozilla.firefox
Tarball Download a newer .tar.xz and replace the directory

Confirm with firefox --version. List packages with list installed packages on Debian.


Uninstall Firefox

Mozilla APT firefox package

bash
sudo apt remove firefox

Dry-run on the test host:

text
REMOVING:
  firefox
Remv firefox [152.0.3~build1]

firefox-esr stays installed if you added it from Debian.

Debian firefox-esr

bash
sudo apt remove --purge firefox-esr

Mozilla repository

bash
sudo rm -f /etc/apt/sources.list.d/mozilla.list /etc/apt/keyrings/packages.mozilla.org.gpg
sudo apt update

Snap / Flatpak / tarball

bash
sudo snap remove firefox
flatpak uninstall org.mozilla.firefox
sudo rm -rf /opt/firefox /usr/local/bin/firefox-portable

Troubleshooting

Symptom Likely cause Fix
Package 'firefox' has no installation candidate Debian ships ESR only sudo apt install firefox-esr or add Mozilla APT
firefox still shows ESR after Mozilla install firefox-esr owns /usr/bin/firefox Check dpkg -S /usr/bin/firefox; reinstall firefox or call /usr/lib/firefox/firefox
Snap Firefox won’t open on SSH server No GUI / Wayland session Use firefox-esr or Mozilla .deb on desktop; Snap needs a user session
Flatpak “No remote found” Flathub not added flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Two Firefox icons Both ESR and Mozilla installed Normal; pick one default in xdg-settings
Old Mozilla repo / 404 in browser Artifactory URLs are for apt, not browsing Use packages.mozilla.org/apt via sources.list only

References


Summary

Install Firefox on Debian with sudo apt install firefox-esr when you want the supported Debian main browser. For the current release, add Mozilla’s APT repository and run sudo apt install firefox. Snap, Flatpak, and the .tar.xz from firefox.com work when you prefer sandboxed or portable installs. On Trixie, plain apt install firefox from Debian alone fails—use ESR or Mozilla’s repo—and verify with firefox --version.


Frequently Asked Questions

1. How do I install Firefox on Debian?

On Debian 13 run sudo apt install firefox-esr for the Debian-packaged Extended Support Release. For the current release channel, add the Mozilla APT repository from support.mozilla.org, then sudo apt install firefox. Snap and Flatpak are optional alternatives.

2. Why does apt install firefox fail on Debian?

Debian stable suites ship firefox-esr, not a rolling firefox package. apt install firefox returns no installation candidate until you add packages.mozilla.org or use firefox-esr instead.

3. What is the difference between firefox and firefox-esr on Debian?

firefox-esr is the long-support build Debian maintains in main (security updates via Debian). The firefox package from Mozilla APT tracks the current release (for example 152.x). Both can be installed together; the firefox command points to whichever package owns /usr/bin/firefox last.

4. Should I use Mozilla APT, Snap, or Flatpak for Firefox on Debian?

Use firefox-esr or Mozilla APT when you want a traditional .deb integrated with apt. Snap and Flatpak sandbox the browser and update through their stores—good for isolation, but heavier and sometimes awkward on minimal servers without a GUI session.

5. How do I update Firefox on Debian?

For firefox-esr: sudo apt update && sudo apt install --only-upgrade firefox-esr. For Mozilla APT firefox: same with the mozilla repo enabled. Snap: sudo snap refresh firefox. Flatpak: flatpak update org.mozilla.firefox.

6. How do I set Firefox as the default browser on Debian?

On Xfce or generic desktops: xdg-settings set default-web-browser firefox.desktop (or firefox-esr.desktop). GNOME and KDE also expose default browser settings in System Settings.

7. Can I install Firefox without adding a third-party repository?

Yes—sudo apt install firefox-esr uses only Debian archives. That is the default browser path documented on wiki.debian.org/Firefox.

8. How do I uninstall Firefox from Debian?

Remove the channel you installed: apt remove firefox or firefox-esr, snap remove firefox, or flatpak uninstall org.mozilla.firefox. Delete /etc/apt/sources.list.d/mozilla.list if you added the Mozilla repo and no longer need it.
Omer Cakmak

Linux Administrator

Highly skilled at managing Debian, Ubuntu, CentOS, Oracle Linux, and Red Hat servers. Proficient in bash scripting, Ansible, and AWX central server management, he handles server operations on …