Ubuntu – Clearing all private user data from Chrome from the command line

google-chrome

After a cross-country move, I no longer physical access to a certain computer running Ubuntu 12.04, but I do have ssh access. I never plan on using Chrome on that computer again, and I would like to clear my cookies, history, cache, and all other private data on that computer from the command line.

I was surprised that I couldn't find any google hits on this topic. Here's one that is close, but it only works for Windows and/or OSX.

https://apple.stackexchange.com/questions/61121/clear-out-chrome-history-from-command-line

That site also includes the following warning:

Google Chrome settings and storage represent user-selected preferences
and information and MUST not be extracted, overwritten or modified
except through Google Chrome defined APIs.

Is that something to worry about in this case?

Best Answer

For the default Chrome configuration, run

rm -rf ~/.config/google-chrome/Default

and

rm -rf ~/.cache/google-chrome

As to the warning from Google, since you aren't going to use it again, and the locations are specific to your HOME location on that machine, don't worry, be happy.