How to reset Google Cloud Shell environment

BruceWayne picture BruceWayne · Nov 29, 2016 · Viewed 9.2k times · Source

I am trying to reset my Cloud Shell disk. I am deleting projects and creating new, but getting same cloud shell with all pre-installed files. Is there anyway to reset completely.

Answer

Arne S picture Arne S · Jun 8, 2017

Yes there is

Restore your Cloud Shell home directory to a clean state:

Check for personal files in the home directory:
  ls -a $HOME
Remove all files from your home directory:
  sudo rm -rf $HOME
In the Cloud Shell menu, click the gear icon, then click Restart Cloud Shell. Click Restart Cloud Shell in the confirmation dialog.

From the docs https://cloud.google.com/shell/docs/resetting-cloud-shell