You can install the Firefox browser on Ubuntu using the default Snap package, the official Mozilla APT repository, the Mozilla Team PPA, a manual tarball, or the Flatpak release. Firefox is the default web browser on Ubuntu and is trusted by millions of users worldwide for its speed, privacy protection, and customizable extension ecosystem.
While Ubuntu installs the Snap version by default, developers and advanced users often look for alternative packaging structures to support custom system integrations, faster cold-start speeds, or side-by-side profile testing.
This guide provides step-by-step terminal instructions for all six installation methods, compares their security structures, and resolves common issues like sandboxed file access limits, profile conflicts, and repository warnings on Ubuntu 24.04 LTS and 26.04 LTS.
If you run into any setup issues or have questions about the installation process, feel free to drop a comment below or contact us directly. We are always here to help you get your system running smoothly.
Snap, Flatpak & APT Complete Guide
Configure the Firefox browser on Ubuntu Desktop. Learn to set up official Snaps, Flathub Flatpaks, configure native deb packages via the official Mozilla repository or PPA, or run direct tarballs in one guide.
Firefox is highly integrated into the Ubuntu ecosystem. Choosing the right installation method impacts how the browser interacts with your local filesystem, updates itself, and performs during initial startup. Containerized options like Snaps and Flatpaks isolate the browser environment for security, while native deb packages and tarball installations run directly on your host system, allowing unhindered developer integrations and directory visibility.
Firefox Installation Methods Compared
Use the matrix below to weigh performance, update patterns, and sandbox styles for each deployment type.
| Method | Packaging | Sandboxed | Updates | Best For |
|---|---|---|---|---|
| Snap Store | Snap Package | Yes (AppArmor) | Background (Auto) | Default desktop use, ARM64 |
| Official Repo | Native deb | No | APT (System Update) | Direct official builds, maximum speed |
| Mozilla PPA | Native deb | No | APT (System Update) | Community-managed native setups |
| Direct Tarball | Binaries (.tar.bz2) | No | Browser auto-update | Developer testing, isolated directory |
| Flatpak | Flatpak App | Yes (Bubblewrap) | Background (Auto) | Cross-distribution consistency |
Method 1: Install Firefox via default Ubuntu Snap
Ubuntu features Firefox as a pre-installed Snap package out-of-the-box. This is Canonical’s default method for shipping Firefox. Because Snaps are containerized, they offer security sandboxing, automatically handle system updates in the background, and include full compilation targets for ARM64 systems like the Raspberry Pi. If Firefox was removed from your system, you can restore it using a single command in your terminal.
Use the snapd daemon to pull and configure the official stable Firefox snap:
sudo snap install firefox
Method 2: Install Native Firefox deb (Official Mozilla Repository)
Mozilla hosts its own official APT repository (`packages.mozilla.org`), serving direct-from-vendor native `.deb` packages for stable releases. This is the recommended route if you want to bypass Snaps entirely, achieve maximum cold-start execution speeds, and run official, unmodified binaries signed directly by Mozilla developers.
First, stop any running Firefox instances, purge the Snap container, and remove the transitional package to avoid conflicts during native deb configurations:
sudo snap remove firefox sudo apt purge -y firefox*
Create a directory to safely house third-party APT signing keys and download Mozilla’s verification keyring:
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
Write the repository connection file, specifying that the keys downloaded in Step 2 must be used to authenticate the package builds:
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 > /dev/null
By default, Ubuntu’s default repository index will try to install the Snap redirect package. Force APT to prioritize Mozilla’s repository for all package queries:
echo -e "Package: *\nPin: origin packages.mozilla.org\nPin-Priority: 1000" | sudo tee /etc/apt/preferences.d/mozilla
Update your APT database to scan the newly registered repository index and install the official native package:
sudo apt update && sudo apt install -y firefox
Method 3: Install Native Firefox deb (Mozilla Team PPA)
If you prefer a community-maintained route, you can configure the Mozilla Team PPA repository. This Launchpad repository is maintained by the Ubuntu community and provides stable native `.deb` packages. Setting it up requires adding the PPA source, establishing priority pinning, and executing the package installation command.
Purge the Snap package and transitional packages, then add the community PPA repository:
sudo snap remove firefox sudo apt purge -y firefox* sudo add-apt-repository -y ppa:mozillateam/ppa
Create an APT configuration file to instruct the package manager to prioritize the community PPA over the default Ubuntu repositories:
echo -e "Package: firefox*\nPin: release o=LP-PPA-mozillateam\nPin-Priority: 1001" | sudo tee /etc/apt/preferences.d/mozillateamppa
Update your APT system package indices and run the installation command:
sudo apt update sudo apt install -y firefox
Note: To ensure native Firefox packages from the PPA are updated automatically by Ubuntu’s unattended-upgrades background routine, execute this command:
echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox
Method 4: Direct Mozilla Download (Tarball Installation)
If you want complete control over your browser version without relying on package repositories, you can install the official Firefox binary archive (tarball) provided directly by Mozilla. By extracting the archive to the system-wide `/opt/` folder and setting correct directory ownership, Firefox can update itself automatically in the background, running exactly as it does on Windows or macOS.
Navigate to your temporary directory, fetch the latest stable Firefox tarball from Mozilla’s CDN, and extract it to the system-wide application folder `/opt`:
cd /tmp wget -O firefox.tar.bz2 "https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=en-US" sudo tar xjf firefox.tar.bz2 -C /opt/
By default, the extracted files are owned by the root account, which blocks Firefox from performing updates under a normal user session. Correct ownership to your user account and create a global system symbolic link:
sudo chown -R $USER:$USER /opt/firefox sudo ln -sf /opt/firefox/firefox /usr/local/bin/firefox
Write a custom `.desktop` entry to register the manually installed Firefox with your system’s application launcher menus:
cat << 'EOF' | sudo tee /usr/share/applications/firefox-tar.desktop [Desktop Entry] Version=1.0 Name=Firefox (Tarball) Comment=Web Browser GenericName=Web Browser Exec=/opt/firefox/firefox %u Icon=/opt/firefox/browser/chrome/icons/default/default128.png Terminal=false Type=Application Categories=Network;WebBrowser; MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https; EOF
Method 5: Install Firefox via Flatpak (Flathub)
Flatpak is an increasingly popular sandboxing system for Linux desktop environments. The Firefox Flatpak is officially packaged and supported directly by Mozilla on the Flathub repository. Since Ubuntu does not include Flatpak out-of-the-box, you must configure the Flatpak system daemon first, register the Flathub remote repository, and execute the installation command.
Install the Flatpak helper system daemon and add the Flathub package source to your system registries:
sudo apt update sudo apt install -y flatpak sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
Pull the official sandboxed package from Flathub:
flatpak install flathub org.mozilla.firefox
Method 6: Access Firefox Beta, Developer Edition, or Nightly
If you are a web developer, extension designer, or Linux enthusiast looking to test bleeding-edge features, you can access Firefox’s testing channels on Ubuntu. You can configure this easily using Snap channels, the official Mozilla repository, or community-maintained PPAs.
Switch Snap Channels:
You can shift your existing Snap version of Firefox between channels without losing your local bookmarks or settings. Refresh the browser to Beta, Developer Edition (Candidate), or Nightly (Edge):
# Switch to Beta: sudo snap refresh firefox --channel=beta # Switch to Developer Edition: sudo snap refresh firefox --channel=candidate # Switch to Nightly (Edge): sudo snap refresh firefox --channel=edge
To revert your Snap installation back to the stable channel, run:
sudo snap refresh firefox --channel=stable
Official Repository Testing Packages:
If you have set up the official Mozilla APT repository (Method 2), you do not need PPAs to access beta or nightly packages. Simply install the alternative package builds directly via APT:
# Install Firefox Beta: sudo apt install -y firefox-beta # Install Firefox Nightly: sudo apt install -y firefox-nightly
Configure Testing PPAs:
To run native deb packages from community PPAs for testing builds, add the corresponding PPA repository to your system. Keep the APT pinning preferences file configured (see Method 3) so your system reads the PPA packages correctly:
# Add the Beta/Next PPA: sudo add-apt-repository -y ppa:mozillateam/firefox-next sudo apt update sudo apt install -y firefox # Add the Nightly/Daily PPA: sudo add-apt-repository -y ppa:ubuntu-mozilla-daily/ppa sudo apt update sudo apt install -y firefox-trunk
Note: Running beta or nightly packages alongside a stable native build can cause configuration conflicts in your main profile folder. It is recommended to use the profile launcher to isolate them: firefox -P.
Firefox Screenshots
- Firefox installed via flathub from Firefox on Ubuntu 24.04: Install Guide
- Firefox homepage clean from Firefox on Ubuntu 24.04: Install Guide
- Pocket plugin on firefox from Firefox on Ubuntu 24.04: Install Guide
- Wikipedia on firefox from Firefox on Ubuntu 24.04: Install Guide
Troubleshooting Common Firefox Issues
If you use the Snap version of Firefox and are unable to upload files from secondary hard drives or download assets straight to a connected USB stick, security sandboxing blocks external directory access. You can grant access to local media mounts via terminal:
sudo snap connect firefox:removable-media
If you try to migrate from Snap back to a native PPA build or official repository package, Firefox may display an error stating that your profile cannot be opened because it was modified by a newer browser build. Bypass this constraint by launching the browser with the profile manager flag to create a fresh directory space:
firefox -P --allow-downgrade
Adding repositories repeatedly or registering alternative sources can cause duplicate entry warnings in terminal updates. Clean up duplicate `.list` configuration files from your system using your shell:
sudo rm /etc/apt/sources.list.d/mozillateam-ppa*.list sudo rm /etc/apt/sources.list.d/mozilla*.list sudo apt update
How to Uninstall Firefox from Ubuntu
If you want to clean up your system, remove specific configurations, or revert your default browser setup, run the corresponding uninstall steps in your terminal to completely remove the application and purge residual configurations.
1. For the Snap Package (Method 1):
Remove the snap application container and purge all corresponding user cache directories:
sudo snap remove --purge firefox
2. For the Official APT Repository deb (Method 2):
Uninstall the native packages, remove the pinned APT preference, delete the source configurations and imported keyring keys, then refresh your indices:
# Purge the packages sudo apt purge -y firefox firefox-beta firefox-nightly # Delete the mozilla repository and pinning files sudo rm -f /etc/apt/sources.list.d/mozilla.list sudo rm -f /etc/apt/preferences.d/mozilla sudo rm -f /etc/apt/keyrings/packages.mozilla.org.gpg # Refresh index sudo apt update
3. For the Native PPA deb Package (Method 3):
Uninstall the native packages, remove the pinned APT preferences, delete the Mozilla PPA sources, and refresh your package lists:
# Purge the packages sudo apt purge -y firefox* # Remove the PPA and testing repositories sudo add-apt-repository --remove -y ppa:mozillateam/ppa sudo add-apt-repository --remove -y ppa:mozillateam/firefox-next sudo add-apt-repository --remove -y ppa:ubuntu-mozilla-daily/ppa # Delete the pinning file and configuration files sudo rm -f /etc/apt/preferences.d/mozillateamppa sudo rm -f /etc/apt/apt.conf.d/51unattended-upgrades-firefox # Synchronize package database sudo apt update
4. For the Manual Tarball Installation (Method 4):
Delete the extracted folder, remove the symlink, and purge the desktop launcher menu shortcut:
# Remove binaries and link sudo rm -rf /opt/firefox sudo rm -f /usr/local/bin/firefox # Remove the desktop entry sudo rm -f /usr/share/applications/firefox-tar.desktop
5. For the Flatpak Build (Method 5):
Delete the Flatpak runtime instance and execute runtime garbage collection cleanups to reclaim storage space:
flatpak uninstall org.mozilla.firefox flatpak uninstall --unused
Frequently Asked Questions
What is the default method to install Firefox on Ubuntu?
The default method is using the Snap package, which comes pre-installed on Ubuntu. If it was removed, you can reinstall it from your terminal by running: sudo snap install firefox. This version is sandboxed for safety and automatically updated in the background.
How do I install a native Firefox deb package without Snap on Ubuntu?
You can install a native deb package by setting up either the official Mozilla APT repository (packages.mozilla.org, recommended) or the community-maintained Mozilla Team PPA (ppa:mozillateam/ppa). Both methods use GPG keys, repositories, and APT pinning files to prioritize native deb packages over the Snap transition wrapper.
Can I run multiple versions of Firefox side by side on Ubuntu?
Yes. You can run different versions (like Stable, Beta, and Nightly) side-by-side. It is recommended to use the Firefox Profile Manager (firefox -P) to create separate profiles for each version to prevent data corruption.
How do I update Firefox if installed manually from a tarball?
If you set the directory ownership of /opt/firefox to your user account (sudo chown -R $USER:$USER /opt/firefox), Firefox will automatically download and apply updates in the background just like it does on Windows or macOS.
What are the main differences between Firefox Snap and the PPA/APT versions?
The Snap version runs in a secure, containerized sandbox, which provides better security but can result in slightly slower first-launch times and restrictions when accessing external files or terminal commands. The native deb packages run directly on the host system without sandboxing, offering faster launch times and unrestricted file access.
More Ubuntu browser guides: Best Web Browsers for Ubuntu · Chromium for Ubuntu · Install Chrome on Ubuntu · Opera Browser for Ubuntu · Install Opera GX on Ubuntu




