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.

  • Chrome now has built in support for clearing history, cookies, and other data, so this question is no longer relevant.
    – nhinkle
    Jun 6 '11 at 21:08
  • 2
    @nhinkle: please cite version number or page of google documentation. chrome has had "support" for some time, but the support as of chrome 11 (current stable version) allows only to delete recent history, not old history Jun 7 '11 at 0:13
  • that's fair; I've re-opened the question. My apologies for not understanding it properly.
    – nhinkle
    Jun 7 '11 at 0:41
  • @NormanRamsey, Chrome automatically remove history older than 90 days. Is that what you wanted?
    – Pacerier
    Oct 12 '15 at 6:25

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):

delete from urls where last_visit_time <= (strftime('%s',(select 
   max(last_visit_time)/10000000 from urls),'unixepoch','-1 days')*10000000);

Here is another one which will probably work on Thumbnails database:

attach database 'History' as history;
delete from thumbnails where last_updated <= (strftime('%s',(select 
   max(last_visit_time)/10000000 from history.urls),'unixepoch','-1 days')

This will probably work on History Index-es:

attach database 'History' as history;
delete from info i, pages_content pc where i.time <= (strftime('%s',(select
   max(last_visit_time)/10000000 from history.urls),'unixepoch','-1 days')*
   10000000) and i.rowid = pc.rowid;

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.

  • 2
    Thanks for the detailed answer. I knew I should have paid more attention in database class. Dec 21 '10 at 2:35
  • @whitequark, What do you mean by "shifted to the future"?
    – Pacerier
    Oct 12 '15 at 6:24

(This is not an answer, but I'm leaving it up as a warning.)

I've seen two extensions that claim to do this in some way, but neither works.

However these (and I expect other extensions) only call chrome.history.deleteRange — if you're lucky, with reasonable parameters. According to the documentation:

Removes all items within the specified date range from the history. Pages will not be removed from the history unless all visits fall within the range.

And in practice, I can't see any effect, beyond (I think) pages not appearing in the history page. In particular the history database file is still large, and Chrome still makes a lot of IO to it. So I suspect (from very casual observation with Chromium 9 beta r68937) that chrome.history.deleteRange only affects what's visible in the chrome://history page and not what's stored on the disk and affects things like URL bar completion.

  • 2
    Both are bad news. History limiter removes all but your last 7 days, so the moment you install it, you lose. And Click2Clear History is a usability disaster, not to mention that the "custom period" in the screen shot appears not to work. Avoid both these extensions---especially History Limiter, which irreversibly removes access to your history. And it doesn't remove the damn data, either!!!! Dec 21 '10 at 2:45
  • What do you mean by that last line, 'it doesn't remove the damn data either'? I wanna get rid of the large History Index files on my drive, will it do that?
    – Neil
    Feb 6 '11 at 7:05
  • History limiter was fixed to not behave like Norman pointed out. Also, there is a fork of History limiter which seems updated and better: chrome.google.com/webstore/detail/history-limiter-custom/…
    – bdombro
    Aug 13 '18 at 19:04
  • @bdombro damn it! I just lost all my history because of your inaccurate comment! It's not true that History Limiter (and its newer fork) were fixed to not behave like Norman pointed out... in fact the second part of his comment where Norman said HL would irreversibly remove history still holds 100% true, and what's even worst, this stupid tool will erase history right after the day value is edited, without any warning at all! I hope this will save someone else work at least!
    – jj_
    Jan 12 at 5:16

All these answers were helpful but outdated. I found and use the "History Limiter Custom" plugin and it works flawlessly.

History Limiter Custom is a newer version of "History Limiter" which has better performance and is mostly bug-free.


  • BEWARE! This stupid tool will permanently erase browsing history right after the day value is edited, without any warning at all!
    – jj_
    Jan 12 at 5:19
  • Do you mean that it deleted the history after you click “Set”?
    – bdombro
    Jan 13 at 12:10
  • exactly and when doing so it did not say that it was going to delete history permanently. Also "set" is not a synonym for delete, and one could think that the extension would just hide the old history rather than erasing it.
    – jj_
    Jan 14 at 13:41
  • This is a good warning! I agree it should have a confirmation after clicking Set to delete stuff.
    – bdombro
    Jan 15 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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