- get sqlite3, a single file command line SQLite database manager, for your platform (available for Linux, Windows, and Mac OS X).
- Copy the downloaded binary to your profile folder where all your .sqlite files reside.
- Close Firefox.
- From a command line prompt in your profile folder, run:
sqlite3 [SQLite database] VACUUM
replacing [SQLite database] with the name of a SQLite file, like places.sqlite.
On Windows, to defragment all SQLite databases in one command, run:
for %a in (*.sqlite) do (sqlite3 %a vacuum)