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".
To disable Cloud Shell for specific users, you'll need to use access groups, adding the individual users to the group and turning off the group's Cloud Shell access setting. Refer to the Controlling who uses Google Cloud in your organization guide for detailed instructions.
Resetting Cloud Shell
To 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 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.