Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have some big sqlite3 databases in ~/.mozilla/firefox/profilename

Notably places.sqlite (12 MB) and urlclassifier3.sqlite (33 MB).

Is it possible to truncate them and wipe out the oldest records in them?

Of course I could just wipe them completely, but that's not my goal - I just want to minimize the size of those files while keeping the newest records.

share|improve this question

3 Answers 3

up vote 2 down vote accepted

The places.sqlite database contains all your bookmarks and history -- you can just remove unneeded history from Firefox. urlclassifier3.sqlite is a list of phishing site URLs, and you can delete it completely -- while anti-phishing is enabled, it will be re-populated automatically (it may be smaller afterwards, so deletion is not useless).

If you want to disable anti-phishing completely, you can turn off these two checkboxes in settings: firefox settings

If you want to optimize them even more, check this article.

share|improve this answer
The above site ( is dead. This is an archived copy of the same. –  Ashutosh Jindal Nov 14 '13 at 8:38

From this article, all you have to do is go into Tools=>Error Console and paste in Components.classes[";1"].getService(Components.interfaces.nsPIPlacesDatabase).DBConnection.executeSimpleSQL("VACUUM");

share|improve this answer
I know about the VACUUM command in sqlite, I'm doing it manually sometimes. But AFAIK it only compresses the filesize by removing the empty gaps, it doesn't purge oldest records from the database, which is my primary goal. –  vtest Aug 25 '10 at 11:51

Another alternative (if you're using Windows) is to use the already-useful-for-other-reasons CCleaner (AKA CrapCleaner). It includes an option to clean up and compress the Firefox databases as part of its regular cleaning tasks.

share|improve this answer
I thought it was obvious from my question that I'm not using Windows. Please see the location of the user directory. –  vtest Aug 25 '10 at 11:50
@vtest: Nope, not obvious. That's what tags are for. –  boot13 Aug 25 '10 at 13:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.