How to uninstall the Google Cloud CLI on a Mac
Remove the gcloud command line tools, installed with Homebrew or Google's script, and the sign in details they keep in ~/.config/gcloud.
How do I uninstall gcloud on a Mac?
- Sign out first, while gcloud still works:
gcloud auth revoke --all. - Uninstall it. Homebrew:
brew uninstall --cask gcloud-cli. Google's install script: delete thegoogle-cloud-sdkfolder it made, and its lines in~/.zshrc. - Move
~/.config/gcloudto the Trash.
How big is the Google Cloud CLI?
On our Mac the SDK in /opt/homebrew/share/google-cloud-sdk was 442 MB, and ~/.config/gcloud, with sign in details, settings and logs, was 91 MB.
What is in ~/.config/gcloud?
Your accounts, access tokens, configurations and logs. Deleting the folder without revoking first leaves the tokens valid on Google's side until they expire.
Python packages gcloud needed may remain: see uninstall Python.
Common questions
How do I uninstall Google Cloud SDK on Mac?
Run gcloud auth revoke --all, then brew uninstall --cask gcloud-cli or delete the google-cloud-sdk folder, then remove ~/.config/gcloud.
Where does gcloud store credentials on Mac?
In ~/.config/gcloud in your home folder.