To thoroughly uninstall an older version of Firefox on Ubuntu, you must remove both the application package and any lingering user profile data. This ensures a clean slate, especially if you plan to install a different version or a fresh copy.
Step 1: Uninstall the Firefox Application
Firefox on Ubuntu is typically installed as either a Snap package (common in recent Ubuntu versions) or an APT package (more common in older Ubuntu versions or specific installations). The uninstallation method depends on how Firefox was originally installed.
Uninstalling Firefox Installed as a Snap Package
If Firefox was installed via Snap, which is the default for many modern Ubuntu releases, use the snap
command. This removes the application and its core system files.
- Open a Terminal: You can do this by pressing
Ctrl + Alt + T
or searching for "Terminal" in your applications menu. - Execute the uninstall command:
sudo snap remove firefox
You will be prompted to enter your administrative password. After entering it, the system will proceed to remove the Firefox Snap package.
Uninstalling Firefox Installed as an APT Package
If your Firefox installation was through the APT package manager (e.g., from Ubuntu's repositories before Snap became standard, or via a PPA), use the apt
command.
- Open a Terminal: Press
Ctrl + Alt + T
. - Execute the purge command:
sudo apt purge firefox
The
purge
command is important here as it removes the application package along with its system-wide configuration files. - Remove unused dependencies (optional but recommended):
After uninstalling, some dependencies that were exclusively used by Firefox might remain. You can remove them with:sudo apt autoremove
Step 2: Delete Remaining User Profile Data
Even after uninstalling the Firefox application, your personal user profile data—which includes bookmarks, browsing history, saved passwords, cookies, and extensions—typically remains on your system. This data is stored separately from the application files. To ensure a complete removal of an older version, or to troubleshoot issues by starting fresh, you should delete this profile folder.
Follow these steps to remove your Firefox user profile data:
-
Open your Home folder: Click on the 'Files' icon in your dock or search for 'Files' in your applications. This will open a file browser window showing your home directory.
-
Show Hidden Files: In the file browser, click on the "View" menu (or similar option, often represented by three dots or a gear icon) and select "Show Hidden Files." Hidden files and folders on Linux systems start with a dot (
.
). -
Navigate to the Mozilla directory: Open the folder named
.mozilla
. -
Delete the Firefox profile folder: Inside the
.mozilla
folder, locate and delete the folder namedfirefox
. This folder contains all your user-specific Firefox data.Note: Deleting this folder will remove all your personal Firefox data. If you wish to back up your profiles before deletion, you should copy the
firefox
folder to another location first.
Step 3: Verify the Uninstallation
To ensure Firefox has been completely removed from your system, you can try running the following command in the terminal:
whereis firefox
If Firefox is completely uninstalled, this command should return no results or only point to leftover man pages, indicating that the executable is gone.
By following these steps, you will have effectively uninstalled the older version of Firefox, removing both the application and its associated user data from your Ubuntu system.