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 '%delicious%'
    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/Local Storage"
rm ...
Advertisements

One thought on “Clearing Cookie Junk in Google Chrome Web Browser

  1. Pingback: Installing Ubuntu 14.04 Server Edition | Elmar Klausmeier's Weblog

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s