Ryan Tomayko/Aristotle tweeted some handy commands today to clean up the SQLite3 database files that Firefox uses. Christian Neukirchen then tweeted an even shorter version (for zsh) that has the same effect.
What they do is run the SQLite VACUUM command on all the SQLite database files to clean them up.
Here’s how, assuming you have the sqlite3 binary installed and somewhere in your path:
- Open a shell and
cdto the directory where Firefox keeps its databases. On OS X that’s~/Library/Application Support/Firefox/profiles/*.default - Quit Firefox
- Run the following command:
In Bash:for f in *.sqlite; do sqlite3 $f vacuum; done
In ZSH:for f (*.sqlite) sqlite3 $f vacuum(stolen from Christian Neukirchen’s tweet)
On Windows: get a decent shell :) (or wait for someone to tell me how you’d do that on Windows). - Christian Neukirchen also points out that there’s a SQLite3 Database in
~/Library/Caches/Firefox/Profiles/*.defaultthat you should vacuum as well
That’s it. After doing this, Firefox still wasn’t anywhere near being a speed demon, but did work noticeably smoother.
Tweet
