I'm working on a laptop with a modest hard drive, and 500MB is taken up with Google Chrome "History Index" and "Thumbnails" files. Some of these files are a year old. Chrome offers me the option to remove recent history, but I want the opposite: I want to remove old history. (Ideally I would remove the least recently used history information, but I don't expect to be able to do that.)
Anyone have any ideas? I'm running the standard Debian google-chrome-beta
package.
Best Answer
Shameful to Google, there is no way yet.
Besides that, all the Chrome databases are just sqlite3 files, and you can use sqlite3 to purge unneeded entries. First, install the
sqlite3
client (sudo apt-get install sqlite3
), and then go to Chrome config (should be.config/chrome/Default
).Here is an SQL snippet which purges old URLs from history (works on databases
History
,Archived History
):Here is another one which will probably work on
Thumbnails
database:This will probably work on
History Index
-es:Of course you should backup all the databases, because you may have different version of Chrome, or I may accidentally miss a symbol, etc.
As Chrome stores its times in some weird format based on UNIX Epoch (but multiplied by 10^7 and shifted to the future), system functions returning date cannot be used; the date of last page opening is used instead.
You can replace
-1 days
with any interval you want; you can read about allowed modifiers in SQLite documentation (shortly:-N days
,-N months
).After removing unneeded data, you may want to issue
vacuum;
command which shrinks the database even further.