Cloud Shell can be disabled for managed user accounts. You can restore your Cloud Shell home directory to a clean state.
Disable 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.
Reset 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 > Restart.More
Click Restart in the confirmation dialog.
A new VM is provisioned and the home directory is restored to its default state.