, 1 min read

Clearing Cookie Junk in Google Chrome Web Browser

Original post is here eklausmeier.goip.de/blog/2013/10-20-clearing-cookie-junk-in-google-chrome-web-browser.


From time to time I check what I have collected as cookies in my browser and I spot web sites which I probably have never visited directly but somehow set cookies. Instead of deleting them individually I now use sqlite3 to do this.

cd ~/.config/google-chrome/Default
sqlite3 Cookies "delete from cookies
    where host_key not like '%google%'
    and host_key not like '%facebook%'
    and host_key not like '%wordpress%'
    and host_key not like '%tumblr.com'
    and host_key not like '%github%'
    and host_key not like '%youtube%'
    and host_key not like '%wikipedia%'
    and host_key not like '%twitter%' ;"

This leaves the "good" cookies intact but removes the junk.

Deleting "local storage" is even simpler.

cd "~/.config/google-chrome/Default/"
rm -rf "Local Storage"