Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have been using firefox for a long time in Ubuntu, I downloaded some add-ons but it made firefox extremely slow, even if I remove them nothing will change. I tried to remove firfox also but re-installing it will somehow recover the same firefox I had, it seems it write some info somewhere that even if you remove firefox it will keep them.also I am not able to use see any flash videos or website with firefox(chrome works fine)..honestly I tampered with plug-in settings in firfox that this happened. but right now I can't do anything to overwrite the setting...my question is how I can remove firefox in a way to remove any previous traces and re-install a new version like for the first time? thanks

share|improve this question

6 Answers 6

up vote 11 down vote accepted

Delete Firefox and all it's data:

I think this can be done in five easy steps, please edit my answer - or tell me to - if it's not complete:

  1. run sudo apt-get purge firefox

  2. Delete .mozilla/firefox/ in your home directory, should it still be there

  3. Delete .macromedia/ and .adobe in your home directory, these can contain "Flash Cookies" stored by the browser. The same is true, if applicable, for Silverlight (Moonlight) and other plugins, they can allow websites to store data on your computer.

  4. Delete /etc/firefox/, this is where your preferences and user-profiles are stored

  5. Delete /usr/lib/firefox/ should it still be there

  6. Delete /usr/lib/firefox-addons/ should it still be there

Mind the periods in front of file- and directory names: They indicate a hidden directory. You can tell your File Browser to show them by pressing Ctrl+H.

The 4th and 5th step must be done with superuser privileges. To start a the File Browser as a superuser, press Alt+F2 and enter gksu nautilus.

Finally, restart your computer to get rid of all temporary files. This should remove all traces of firefox ever being there.

Important:

  • Don't rely on this method if you've got sensitive information to protect! Deleting a file, in most cases, only means deleting a reference to it. The raw data will still be on your hard drive, and the proverbial bond-villain will be able to recover them. I'm only mentioning this in case it's applicable to anybody who reads this. The only way to really get rid of data, is to shred the hard drive to bits.
share|improve this answer
1  
You answered the OP's question exactly as asked in the title, but this is yet another case of the person really asking for something somewhat different, which is how to use Firefox in its original pristine state. This is better answered by this other answer with less upvotes: askubuntu.com/a/16773/43660 –  Chan-Ho Suh Apr 10 '12 at 15:27
    
Only steps 2 and 3 are required to meet the aims of resetting firefox to being like new. The other steps remove the binaries of firefox from your system, but they don't have any "state" or information about what you did. Also, it is incorrect that /etc/firefox is where your preferences are stored - they are stored in ~/.mozilla/firefox/ –  Hamish Downer May 11 '12 at 17:00
    
I found this answer very helpfull, it's answering the op question which also made me come to this thread in the first place... so thank you for answering to the question and not to somthing else... –  alex alex Jun 3 at 12:01

You only need to type:

sudo apt-get purge firefox 

and then type y for "Yes", and Enter

That took care of everything. Firefox is now off of my computer and Google Chrome is doing a great job.

share|improve this answer

This will do the whole trick, removing all packages and files,

sudo apt-get --purge autoremove firefox

"autoremove" purges everything that once was needed to install or run a program.

Also remember to update or dist-update (this last one is my favorite), after you removed firefox or any other software. Some users recommend doing a simple update before removing or installing programs.

share|improve this answer

All the answers given so far are way too drastic. You don't need to apt-get purge firefox or rm -rf ~/.mozilla to get what you want.

Here's the thing. Firefox doesn't store any user data in itself. What it does instead is create what's known as a "user profile" -- a directory in your home directory -- and store all your data in there. And by data I mean everything -- add-ons, themes, browsing history, stored passwords, and on and on. (The actual location of your profiles in the filesystem varies by OS; on Ubuntu and other Linuxes, it's generally in .mozilla/firefox in your home directory.) Data in the user profile is completely separate from the Firefox application itself, so removing Firefox via apt-get or the like won't delete the profile data; when you reinstall Firefox later, it'll just look up your profile and reload it all, which can be frustrating if you don't realize what's going on.

When you first use Firefox, it silently creates a default profile for you, and uses that profile from that day onward. But you don't have to use that profile. Firefox supports multiple profiles, and you can switch back and forth between them at will. This means that to get Firefox back to the way it was the day you first installed it, you don't have to touch the Firefox binaries at all -- all you have to do is create a new, empty profile, and use it instead of your old, cluttered one. Restart Firefox and it'll be like you never ran it before.

Here's how to create a new FF profile in Ubuntu:

  • Close all running Firefox windows
  • Open a console window (profile management is only accessible via the command line)
  • Run the following command at the prompt: firefox -ProfileManager
  • This will launch the Firefox Profile Manager -- a dialog box that looks like this:

Firefox profile manager

Yours will probably only have one profile listed -- that's your current, default profile, with all your add-ons and other stuff. It'll have a name that starts with a string of random characters; that's because FF had to come up with a name for it when it automatically created the profile, so it just used a random string.

  • Click the "Create Profile" button. This will launch a wizard walking you through defining a new, empty profile. When that process is complete you'll be returned to the Profile Manager dialog box, now with two profiles listed, your old one and your new one.
  • Select your newly created profile.
  • Optional: if you want Firefox to use your new, empty profile from now on by default, check the "Don't ask at startup" box. If you'd prefer FF to prompt you for which profile you want to use each time you run it, leave that box unchecked.
  • Click "Start Firefox".

Now Firefox will restart, completely fresh and new as the first day you downloaded it. Problem solved. And if you ever need to retrieve something from your old profile, like your old bookmarks, say, all your old data is archived in your old profile, so you can safely retrieve it later.

share|improve this answer
1  
This is a very useful answer, much cleaner than the others. Besides it can be applied to other operating systems, as the screenshot suggests. –  Agmenor Dec 9 '10 at 17:48
    
That's correct -- the same process will work on Windows, OS X, or anywhere else Firefox runs, though the exact command to invoke the Profile Manager and the location of the profile directory will vary depending on what OS you're on. –  jalefkowit Dec 10 '10 at 3:01

First of all, remove Firefox and all of its configuration files by typing in:

sudo apt-get purge firefox

Also, make sure that the ~/.mozilla directory (which contains Firefox' configuration files) is deleted:

rm -rf ~/.mozilla

It might even not be necessary to reinstall Firefox, just remove the ~/.mozilla directory (step two) and restart Firefox, and it should be just as if you just installed it.

share|improve this answer

You can try to delete the ~/.mozilla folder which contains all the browser's settings.

share|improve this answer
    
Be careful with this solution -- on some of my systems, it looks like a version of thunderbird installed its data folder in a subdirectory of the .mozilla folder. (This could have been user choice, but I would definitely check the folder contents first for any obvious red flags.) –  belacqua Feb 4 '11 at 21:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.