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')
*10000000);
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.
The history aswell as the cookies and browser cache are stored in a cache folder (%LOCALAPPDATA%\Google\Chrome\User Data\Default). These files are just normal files and if deleted then they are either in the bin or deleted from the hdd.
You could try some recovery tool to get the files back, but I do not think it would be easy.
Best Answer
Chrome stores its history in SQlite 3 database. You can simply read / modify this database file. Be sure to inform users that things done in that system will not be private and their stuff might be gone anytime.
Windows:
C:\users\username\AppData\Local\Google\Chrome\User Data\Default\History
Linux:
~username/.config/google-chrome/Default\History
Open with any SQLite 3 capable software.