Software & AppsOperating SystemLinux

How To Completely Uninstall Firefox in Ubuntu and Start Fresh

Ubuntu 10

In this guide, we will walk you through the process of completely uninstalling Firefox from your Ubuntu system and starting fresh. Whether you’re troubleshooting issues or just looking to start from scratch, this guide will provide you with the necessary steps to achieve that.

Determine the Installation Method

Before we begin, it’s crucial to identify how Firefox was installed on your system. The two most common methods are via apt or snap. To determine this, open your terminal and run the following command:

type firefox

The output will tell you whether Firefox was installed using apt or snap.

  • If the output is firefox is /usr/bin/firefox, Firefox was installed using apt.
  • If the output is firefox is /snap/bin/firefox, Firefox was installed using snap.

Uninstalling Firefox Installed via apt

If Firefox was installed using apt, follow these steps:

Step 1: Remove the Firefox Package

Run the following command to remove the Firefox package:

sudo apt-get purge firefox

Here, sudo is used to run the command with root privileges. apt-get purge is used to remove packages and their configuration files.

Step 2: Remove User Profile

Next, delete the .mozilla/firefox/ directory in your home directory to remove the user profile. This can be done with the following command:

rm -rf ~/.mozilla/firefox/

In this command, rm is the remove command, -rf are options that tell the command to recursively (-r) remove files and to force (-f) the removal.

Step 3: Remove Flash-related Data

Delete the .macromedia/ and .adobe directories in your home directory to remove any Flash-related data. This can be done with the following commands:

rm -rf ~/.macromedia/
rm -rf ~/.adobe/

Step 4: Remove Preferences and User Profiles

Delete the /etc/firefox/ directory to remove preferences and user profiles. This can be done with the following command:

sudo rm -rf /etc/firefox/

Step 5: Remove Remaining Firefox Directories

Finally, delete the /usr/lib/firefox/ and /usr/lib/firefox-addons/ directories if they still exist. This can be done with the following commands:

sudo rm -rf /usr/lib/firefox/
sudo rm -rf /usr/lib/firefox-addons/

Uninstalling Firefox Installed via snap

If Firefox was installed using snap, the process is much simpler. Run the following command to remove the Firefox snap package:

sudo snap remove firefox

Restart Your System

After completely removing Firefox, restart your system to ensure any temporary files are also removed.

sudo reboot

Alternative Method: Creating a New Profile

If you’d rather not completely remove Firefox, you can create a new profile to start fresh. This will not affect the existing installation. Here’s how:

Step 1: Close Firefox

Ensure all running Firefox windows are closed.

Step 2: Open Profile Manager

Open a terminal and run the following command to open the Firefox Profile Manager:

firefox -ProfileManager

Step 3: Create New Profile

In the Firefox Profile Manager, click “Create Profile” and follow the wizard to create a new, empty profile.

Step 4: Start Firefox with New Profile

Select the newly created profile and click “Start Firefox”. Firefox will restart with the new profile, as if it was freshly installed.

Conclusion

In this guide, we’ve covered how to completely uninstall Firefox in Ubuntu, whether it was installed via apt or snap. We’ve also provided an alternative method of creating a new profile to start fresh without affecting the existing installation. Remember to always update or dist-upgrade your system after removing any software.

We hope this guide has been helpful. If you have any questions or run into any issues, feel free to ask for help on Ubuntu Forums or Ask Ubuntu.

Can I uninstall Firefox without removing my bookmarks and saved passwords?

Yes, uninstalling Firefox will not remove your bookmarks and saved passwords. These are stored in your Firefox profile, which is not deleted during the uninstallation process. If you want to be extra cautious, you can back up your Firefox profile before uninstalling.

How can I back up my Firefox profile?

To back up your Firefox profile, simply copy the .mozilla directory in your home directory. This directory contains your Firefox profile, which includes your bookmarks, saved passwords, extensions, and other settings. You can paste this directory back after reinstalling Firefox to restore your profile.

Will uninstalling Firefox remove my installed extensions and themes?

Yes, uninstalling Firefox will remove any installed extensions and themes. However, if you have a Firefox Sync account, you can easily sync your extensions and themes back after reinstalling Firefox.

How can I reinstall Firefox after uninstalling?

To reinstall Firefox, simply open your terminal and run the following command:

sudo apt-get install firefox

This command will reinstall Firefox using the apt package manager. If you previously installed Firefox using snap, you can use the following command to reinstall:

sudo snap install firefox
Will uninstalling Firefox affect other web browsers installed on my system?

No, uninstalling Firefox will not affect other web browsers installed on your system. Each browser operates independently, and removing one will not impact the others.

Leave a Comment

Your email address will not be published. Required fields are marked *