Uninstall Firefox on Linux: Complete Guide
In this article
To uninstall Firefox on Linux, use your distribution's package manager—such as APT on Debian/Ubuntu, DNF on Fedora, or Pacman on Arch—with the appropriate remove command. In most cases, the command will be similar to sudo apt remove firefox or sudo dnf remove firefox.
Understanding Linux Package Management
Linux distributions rely on package managers to install, update, and remove software. Unlike Windows or macOS, where applications are often self-contained, Linux software is typically integrated into the system via these managers. This ensures dependency resolution, security updates, and clean removal. The method to uninstall Firefox depends entirely on how it was originally installed and which distribution you're using. Most mainstream distributions include Firefox by default, installed through their native package system.
Common package managers include:
- APT (Advanced Package Tool): Used in Debian, Ubuntu, and their derivatives.
- DNF (Dandified YUM): Found in Fedora and newer Red Hat-based systems.
- Pacman: Used by Arch Linux and Manjaro.
- ZYPPER: Used in openSUSE.
Each of these tools interfaces with official repositories to manage software. When Firefox is installed from such a source, removing it via the same tool ensures all associated files and dependencies are handled correctly.
Standard Uninstallation Methods by Distribution
The correct way to uninstall Firefox depends on your Linux distribution. Below are the standard commands for major systems. Always run these in a terminal with appropriate permissions.
- Ubuntu/Debian and derivatives:
- Open a terminal.
- Run:
sudo apt remove firefox - To also remove configuration files:
sudo apt purge firefox - Clean up unused dependencies:
sudo apt autoremove
- Fedora/RHEL/CentOS Stream:
- Open a terminal.
- Run:
sudo dnf remove firefox - To remove configs:
sudo dnf remove firefox*or manually delete~/.mozilla
- Arch Linux/Manjaro:
- Open a terminal.
- Run:
sudo pacman -R firefox - To remove configs and unused dependencies:
sudo pacman -Rns firefox
- openSUSE:
- Open a terminal.
- Run:
sudo zypper remove firefox - Remove configs:
rm -rf ~/.mozilla
These commands remove the main Firefox package. However, user profiles, bookmarks, and settings are stored separately and are not deleted by default unless explicitly purged or removed.
Removing Firefox Installed from Mozilla's Website
If you downloaded Firefox directly from mozilla.org as a tarball (e.g., firefox-*.tar.bz2), it was not installed via the package manager. In this case, the uninstallation process is manual. The tarball version is typically extracted to /opt/firefox or a local directory like ~/firefox.
To remove it:
- Locate the installation directory. Common paths include:
/opt/firefox~/firefox/home/username/firefox
- Delete the directory:
sudo rm -rf /opt/firefox(adjust path as needed). - Remove the desktop shortcut (if created):
- Delete
~/.local/share/applications/firefox.desktop - Or remove from
/usr/share/applications/if placed system-wide.
- Delete
- Remove user data:
rm -rf ~/.mozilla
Note: The tarball version runs independently of the system package manager, so it won't appear in apt list --installed or dnf list installed.
What About Snap and Flatpak Versions?
Many modern Linux distributions, especially Ubuntu, install Firefox as a Snap package by default. Snap is a containerized package system developed by Canonical. If Firefox was installed as a Snap, standard package removal commands like apt remove will not work.
To check if Firefox is installed as a Snap:
- Run:
snap list | grep firefox
If it appears, uninstall with:
sudo snap remove firefox
Similarly, if Firefox was installed via Flatpak (common on Fedora Workstation or GNOME-based systems), use:
flatpak uninstall org.mozilla.firefox
To list all Flatpak apps: flatpak list. Flatpak installations are sandboxed, so user data may be stored in ~/.var/app/org.mozilla.firefox rather than ~/.mozilla. Clean up with: rm -rf ~/.var/app/org.mozilla.firefox.
User Data and Configuration Files
Uninstalling Firefox does not automatically delete your personal data—bookmarks, passwords, history, and extensions. These are stored in your home directory under ~/.mozilla/firefox/. This separation allows you to reinstall Firefox later and restore your profile.
If you want a complete removal, including all settings and saved data, manually delete this directory:
rm -rf ~/.mozilla
Be cautious: this action is irreversible and will erase all Firefox profiles. If you plan to reinstall Firefox later and keep your data, back up the ~/.mozilla/firefox/ folder before deletion.
Frequently Asked Questions
Will uninstalling Firefox delete my bookmarks?
No, uninstalling Firefox using package managers does not delete bookmarks or profile data. These are stored in ~/.mozilla/firefox/. To remove them, you must manually delete the ~/.mozilla directory. If you want to keep your bookmarks, back up the profile folder before uninstalling.
Can I reinstall Firefox after uninstalling it?
Yes, you can reinstall Firefox at any time using your distribution's package manager or by downloading it from mozilla.org. If you kept your ~/.mozilla folder, your bookmarks, history, and settings will reappear after reinstallation.
Why can't I remove Firefox with apt?
If apt remove firefox doesn't work, Firefox may have been installed via Snap or Flatpak. On Ubuntu, Firefox is often installed as a Snap by default. Run snap list | grep firefox to check. If found, use sudo snap remove firefox instead.
Does uninstalling Firefox free up a lot of space?
The Firefox binary typically uses 100–200 MB. However, your profile in ~/.mozilla can grow much larger over time, especially with cached data, extensions, and saved passwords. Deleting this folder can free up hundreds of megabytes or even gigabytes, depending on usage.
Is it safe to uninstall Firefox?
Yes, it is safe to uninstall Firefox. It does not affect system stability. However, ensure you have another browser installed if you rely on internet access. Also, back up important data like bookmarks before removal if you don’t want to lose them.
What if Firefox is a system dependency?
In most distributions, Firefox is not a hard system dependency. Removing it will not break the OS. However, some third-party tools or scripts might expect a browser to be present. These usually fail gracefully or can use alternatives like xdg-open to launch another browser.