Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clearing Chrome's cache, cookies, etc via command line? (OSX)

Is it possible to clear chrome's browser cache, & cookies, etc via the command line? I'm on Mac OSX 10.9

I've written a script that switches from development and production environments & it would be really nice to add this to it.

like image 434
wesley-hall Avatar asked Dec 03 '13 17:12

wesley-hall


2 Answers

You can clear specific cookies from Chrome, by using sqlite and its command line interface.

Here's a post on Superuser on how to do this: https://superuser.com/a/920604

like image 112
Ralph Willgoss Avatar answered Sep 28 '22 00:09

Ralph Willgoss


In OS X, your Chrome cache is located at:

/Users/[username]/Library/Caches/Google/Chrome/Default/

To delete the cache you could type:

rm -rf /Users/[username]/Library/Caches/Google/Chrome/Default/Cache/

There is also a media cache in there that you can nuke:

rm -rf /Users/[username]/Library/Caches/Google/Chrome/Default/Media\ Cache/

Other Chrome data is located at:

/Users/[username]/Library/Application Support/Google/Chrome/
like image 32
SunSparc Avatar answered Sep 27 '22 22:09

SunSparc