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.
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
.
firefox is /usr/bin/firefox
, Firefox was installed using apt
.firefox is /snap/bin/firefox
, Firefox was installed using snap
.apt
If Firefox was installed using apt
, follow these steps:
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.
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.
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/
Delete the /etc/firefox/
directory to remove preferences and user profiles. This can be done with the following command:
sudo rm -rf /etc/firefox/
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/
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
After completely removing Firefox, restart your system to ensure any temporary files are also removed.
sudo reboot
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:
Ensure all running Firefox windows are closed.
Open a terminal and run the following command to open the Firefox Profile Manager:
firefox -ProfileManager
In the Firefox Profile Manager, click “Create Profile” and follow the wizard to create a new, empty profile.
Select the newly created profile and click “Start Firefox”. Firefox will restart with the new profile, as if it was freshly installed.
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.