I want a Firefox profile that stays "clean" — one that doesn't store anything between runs. I thought I had it set up properly, only to discover that even if I set it to delete "everything", the profile directory continues to grow over time.
After spending ages reading release notes I eventually decided to use the bigger hammer approach: just start over each time, but with all my settings and extensions.
I use the command line, so if someone wants to explain how to get it integrated into the various desktop paradigms, feel free to share. I suppose the next question is which extensions should be installed ;-)
Setting it all up
- Create the master profile: firefox -createprofile "CLEAN_MASTER $HOME/.mozilla/firefox/profiles/CLEAN_MASTER"
- Run the first time: firefox -no-remote -P CLEAN_MASTER
- Set up all the extensions you use and make all the configuration changes you want. It is important to ensure that nothing (extensions included) gets updated automatically. See below for more on dealing with Firefox or extension updates.
- Quit Firefox.
- Create a backup:
Code: Select all
cd $HOME/.mozilla/firefox/profiles/
tar czvf CLEAN_MASTER.tgz CLEAN_MASTER
Code: Select all
#!/bin/bash
cd $HOME/.mozilla/firefox/profiles
rm -Rf CLEAN_MASTER
tar xzvf CLEAN_MASTER.tgz
firefox -no-remote -P CLEAN_MASTER
The reason the rff script starts by replacing the existing profile (instead of deleting it at the end) is that you'll have to recreate the .tgz file after you've made any changes, such as updating an extension. It is of course up to you to ensure that the only thing you do in such an update session is only those updates, as otherwise your profile will grow exactly as in the way which led me to set up all of this in the first place.
Note that you'll have to go through the same process after a Firefox update, as it can do all manner of things to its profiles.ini and installs.ini files, and you want those changes to take into account your CLEAN_MASTER profile as well.