Disabling or resetting Cloud Shell

Disabling Cloud Shell for managed user accounts

Cloud Shell can be disabled for G Suite and Cloud Identity managed user accounts. This can be done by going to the Google Admin console and then navigating to Apps > Additional Google services > Google Cloud Platform > Cloud Shell Settings and disabling "Cloud Shell Access Settings".

Resetting Cloud Shell

To restore your Cloud Shell home directory to a clean state:

  1. Check for personal files in the home directory:

    ls -a $HOME
    
  2. Remove all files from your home directory:

    sudo rm -rf $HOME
    
  3. In the Cloud Shell menu, click the three dots menu icon, then click Restart Cloud Shell.

    Click Restart Cloud Shell in the confirmation dialog.

    A new VM will be provisioned and the home directory will be restored to its default state.