Hacker News new | ask | show | jobs
by mixmastamyk 3475 days ago
Vacuuming your profile might help:

    #!/bin/bash
    killall firefox
    for file in ~/.mozilla/firefox/*.default/*.sqlite; do
        echo sqlite3 "$file" VACUUM
        sqlite3 "$file" VACUUM
    done
I do it in my once-a-month cleanup script.
3 comments

Looking at `find ~/.mozilla/firefox -name \.sqlite`, there are some more such databases for window.localStorage and the like. So this could be generalized to

  find ~/.mozilla/firefox -name \*.sqlite -print -exec sqlite3 {} VACUUM \;
For those on OS X, it looks like:

find $HOME/Library/Application Support/Firefox -name \*.sqlite -print -exec sqlite3 {} VACUUM \;

I remember the days when leaving Windows meant not having to futz with cleanup scripts.

What happened?

Firefox and SQLite have actually improved a lot since those days. And it's not like Firefox uses a different database system on different platforms, it's all exactly the same.
When was this? I recall having to use Cocktail with OS X (10.2-10.9) because the system maintenance scripts would never run if my laptop was off/asleep at midnight. In general, Unix users have had to use cron scripts almost since its origin.