Amazon holiday deals See deals →ad

Mets Minor League Blog

Music theory, instruments and musicians

Mets Minor League Blog

Music theory, instruments and musicians

How to Uninstall Firefox on Linux Safely

Uninstalling Firefox on Linux means removing the browser using the method that installed it. The right command depends on whether Firefox came from your distribution’s package manager, Snap, Flatpak, or a downloaded archive. Before you begin, save any bookmarks or other data you want to keep. Removing the application does not always remove your personal profile, so this guide explains how to check both.

What You’ll Need

  • Access to a terminal and, for a system-wide package, an account allowed to use sudo.
  • The name of your Linux distribution, if you need to look up the package manager it uses.
  • A backup of any Firefox data you want to keep, such as bookmarks, passwords, or an active profile.

You do not need to download an uninstaller. Linux applications are normally removed with the same package system that installed them. If you are unsure how Firefox was installed, use the identification step below rather than trying several removal commands at random.

Step-by-Step

  1. Save anything you want to keep. If Firefox still opens, export bookmarks from its bookmarks menu and check that passwords or other important information are synced or backed up. Sync is useful, but do not assume it contains every setting or local file. To make a full profile backup, close Firefox first, then copy the relevant profile directory to a safe location. Common locations include ~/.mozilla/firefox for many package installs, ~/snap/firefox/common/.mozilla/firefox for Snap, and ~/.var/app/org.mozilla.firefox for Flatpak. The profile may contain sensitive data, so keep the copy private.
  2. Close Firefox completely. Save open work and close every browser window. If a background process remains, the package manager may remove the application while Firefox is still using its profile. Check with pgrep -a firefox. If it lists a process after you have closed the browser, wait briefly and check again. Avoid force-stopping it until you are sure there is no active session or unsaved work.
  3. Identify how Firefox was installed. Open a terminal and check the relevant tools. On Debian or Ubuntu-based systems, try dpkg -l '*firefox*'; on Fedora, try rpm -qa '*firefox*'. Check Snap with snap list firefox, and Flatpak with flatpak list --app | grep -i firefox. A command may report that the package or app is not installed; that is useful information, not a reason to force removal. If more than one method shows Firefox, inspect each result and remove only the copy you intend to uninstall. A launcher or command named firefox alone does not prove which system installed it.
  4. Remove a distribution package with its package manager. Use only the command for your distribution and confirm the package name shown by the inspection step. On Debian or Ubuntu, a typical command is sudo apt remove firefox; some systems use a package such as firefox-esr instead. On Fedora, use sudo dnf remove firefox. On Arch Linux, use sudo pacman -R firefox. On openSUSE, the package is often named MozillaFirefox, so use sudo zypper remove MozillaFirefox if that is the name installed. Review the proposed changes before confirming, particularly if the manager plans to remove other applications or a desktop component. If the package is not found, do not try a different distribution’s command; return to the install-type check.
  5. Remove Firefox if it was installed as a Snap. If snap list firefox shows the application, run sudo snap remove firefox and confirm if prompted. Snap may retain a snapshot of application data after removal, depending on the system and command used. If you explicitly want Snap to discard its saved data too, and you have already backed up anything you need, use sudo snap remove --purge firefox. This is a separate decision from removing your ordinary Firefox profile; check the profile location before deleting anything manually.
  6. Remove Firefox if it was installed as a Flatpak. If the Flatpak listing shows org.mozilla.firefox, run flatpak uninstall org.mozilla.firefox. Read the confirmation carefully: Flatpak may offer to remove unused runtimes as well as the app. To remove the Flatpak app’s stored data too, use flatpak uninstall --delete-data org.mozilla.firefox after making any needed backup. Do not add this option if you want to preserve the profile for a later reinstall. If Firefox was installed for a particular user, run Flatpak commands as that user so you act on the correct installation.
  7. Handle a manually downloaded copy separately. Firefox downloaded as a tarball may be installed in a directory such as /opt/firefox or somewhere under your home directory. Find the actual executable first with command -v firefox, then inspect its location with readlink -f "$(command -v firefox)". If the path points to a standalone Firefox directory, close the browser and remove only that known application directory using the appropriate permissions. For example, deleting /opt/firefox requires administrator access, while a directory in your home folder usually does not. Also remove a custom launcher only if you can identify it as belonging to that copy. Do not remove a system directory or a package-managed file by guessing from its name.
  8. Verify the result and decide what to do with your profile. Check your application menu and run command -v firefox. If the command still returns a path, identify which installation owns it before taking further action; another Firefox version or a leftover launcher may remain. If you want to keep personal data, leave the profile folder alone. If you want a complete cleanup, first verify your backup, then remove only the profile directory for the install you used. Deleting a profile removes local bookmarks, saved logins, history, extensions, and settings, and may be difficult to undo.

Common Mistakes

A frequent mistake is using the wrong removal method. Running apt remove will not uninstall a Snap or Flatpak, and removing a package will not necessarily remove a manually installed copy. Identify the installation source before choosing a command.

Another mistake is deleting the profile when the goal is only to uninstall the browser. Application files and personal data are separate. A normal package removal usually leaves profile data in place so it can be used again after reinstalling. Conversely, removing the app’s data with an option such as Flatpak’s --delete-data can erase information you expected to keep.

Do not use broad commands such as rm -rf ~/.mozilla without checking what is inside. That folder can hold profiles and data used by other Mozilla applications. Also avoid adding options that remove dependencies or configuration unless you understand the proposed changes. Read your package manager’s confirmation screen instead of accepting a long list of removals automatically.

Tips

Use the package manager’s ordinary remove command first. A “purge” operation, where available, generally targets system-level package configuration; it is not a reliable substitute for checking your personal profile, and its exact effect varies by distribution. If you are planning to reinstall Firefox, keeping the profile is often the easiest way to retain bookmarks and settings.

If you have several user accounts on the computer, remember that each can have a separate Firefox profile and a separate per-user Flatpak installation. Uninstalling an app for one account may not remove a copy installed system-wide, and removing a system package does not automatically erase every user’s profile. Check the account you used to install the browser before cleaning up data.

For a clean transition to another browser, export bookmarks in a format the new browser can import and verify that the export file opens or is stored somewhere safe. If your Firefox profile is encrypted or protected by a master password, treat its backup as sensitive. You can also keep the backed-up profile temporarily and delete it after confirming that the replacement browser has everything you need.

Troubleshooting

The package manager says Firefox is not installed. That usually means Firefox came from another source, or the package has a different name. Check Snap and Flatpak listings, then inspect the path returned by command -v firefox. For Debian-based systems, look for names such as firefox-esr. Use the result to choose the correct removal method instead of repeating the same command with guessed package names.

The command returns “permission denied.” A system-wide package removal normally needs administrator privileges, so use the appropriate command with sudo when your distribution’s instructions call for it. A per-user Flatpak or a Firefox directory in your home folder may not need sudo. Do not run a whole terminal session as root; elevate only the specific system command you need.

Firefox still appears in the application menu. First sign out and back in, or refresh the menu if your desktop environment supports it. Then check whether another installation remains. A stale custom launcher can also remain after a manual install; inspect its target before deleting it. If the launcher points to a missing file, removing that launcher may clear the menu entry, but it does not remove another Firefox installation.

The package manager reports a lock, an interrupted operation, or a dependency problem. Close any other software-management window and wait for an active update to finish. Do not delete package-manager lock files by hand, because another process may be using them. If an earlier package operation was interrupted, follow your distribution’s documented repair procedure, then retry removal. Review dependency changes and stop if the proposed action would remove core desktop components you still need.

Your bookmarks or settings seem missing after reinstalling. The new installation may be using a different profile location or a different Linux account. Do not delete the old profile. Open Firefox’s profile manager or inspect the saved profile directories, then restore or select the correct profile only after making another backup. Snap and Flatpak profiles are commonly stored separately from profiles used by distribution packages.

Frequently Asked Questions

Will uninstalling Firefox delete my bookmarks?
Usually, removing the application alone does not erase the profile, so bookmarks may remain on the computer. They can still be lost if you delete the profile or remove application data explicitly. Export or back them up first if they matter.

How do I know whether I have the Snap or regular Firefox?
Run snap list firefox and check your distribution’s installed packages. If Snap lists Firefox, that copy is installed as a Snap. A package listing may show a separate system-package copy; if both are present, identify which launcher you use before removing either.

Can I uninstall Firefox from the graphical app store?
Yes, if the store shows the Firefox installation you want to remove. Open its app page, choose Uninstall or Remove, and review any prompt about user data or related runtimes. If multiple formats are installed, the store may display more than one entry.

Does apt purge firefox remove my profile?
Do not rely on it to erase your personal profile. APT purge removes package configuration files according to the package’s rules, while profile data is generally stored separately in your home directory. Check the profile location and remove it manually only if you deliberately want to erase it.

Can I reinstall Firefox later and get my old data back?
Often, yes, if the profile was left in place and the reinstall uses the same profile location. A Snap or Flatpak installation may use a different location from a distribution package. Keeping an independent profile backup is the safest option if you plan to switch formats or distributions.

How to Uninstall Firefox on Linux Safely
Scroll to top