Re-Installing Firefox without Losing Your Data

I have been having some problems with Firefox not wanting to play flash or quicktime over the last week, and with the recent release of Firefox 1.5 release, I figured I’d do a full uninstall and reinstall to make sure everything is installed properly.

First thing to do is backup your profile. Hell, back it up twice. The directory is located in the following folder:


  • C:\Documents and Settings\MYUSERNAME\application data\Mozilla\Firefox\Profiles\RANDOM.default\ (windows)
  • /home/MYUSERNAME/.mozilla/firefox/default.5uk (linux)

Back up the RANDOM.default folder to somewhere safe, this is the one that holds your cookies, your saved passwords and form information, etc. All the stuff that you want to keep.

At this point I uninstalled Firefox, flash, quicktime, everything. Then I renamed the profile folder to RANDOM.default.orig, so that the files were still there, but wouldn’t be overwritten or used when firefox is re-installed. Now that’s done, re-install firefox, flash, and quicktime, make sure everything works, and then quit firefox completely.

After a bit of research, and finding this page, I copied the following files from the .orig folder back into the newly created folder in the profile directory:


  • history.dat – browsing history
  • cookies.txt – all my cookies (yummy)
  • bookmarks.html – obvious
  • formhistory.dat – saved form data
  • key3.db and signons.txt – saved passwords, both files required for it to work
  • hostperm.1 – per-site cookie and pop up settings

I may have extra ones in there, and may have missed important ones, but things seem to me. Remember, my goal is to have a fresh firefox install with all my bookmarks, saved passwords, saved browsing history and form history. Note that I’m ignoring the installed extensions because I’m pretty sure one of those was causing my problems.

End result is my firefox is a fresh install, I can now go and re-install extensions (good way to prune them anyway) and have all my important data still there. Hope this helps someone.