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

28,679

Solution 1

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/

Solution 2

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

Solution 3

Try this

Clear Chrome Cache

rm -R /Users/*/Library/Caches/Google/Chrome/Default/Cache

Share:
28,679
wesley-hall
Author by

wesley-hall

Updated on December 31, 2020

Comments

  • wesley-hall
    wesley-hall over 3 years

    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.

  • SunSparc
    SunSparc over 10 years
    He said he is on a Mac.
  • Matt Welander
    Matt Welander about 9 years
    Anyone know the path to Chrome cache on Ubuntu?
  • SunSparc
    SunSparc about 9 years
    @MattiasSvensson, that is worth asking a new question.
  • Viuu -a
    Viuu -a over 5 years
    How to delete a specific site cache insead of clear all the cache from chrome?