Completely Uninstall Google Cloud SDK Mac

Best to rely on official Google Cloud documentation for that, which is short and clear and may vary in the future.

See Uninstalling Google Cloud SDK.


Run gcloud info. This will tell you, among other things, the "Installation Root". You can just delete that folder and you're done. You can also use gcloud formatting to print just the installation root with gcloud info --format='value(installation.sdk_root)'. This is helpful for automation.

If you want, you can also delete your configuration files. You can usually find them in ~/.config/gcloud on MacOS and Linux, but a safer approach would be to use gcloud info --format='value(config.paths.global_config_dir)' to provide the location.

The only other modifications gcloud makes at install time is to put lines sourcing completion.bash.inc and paths.bash.inc in your .bashrc file (if you directed it to do so) and add the installation directory to PATH. These shouldn't have any negative impact but feel to manually remove them too.

Later Edit: Google has official uninstall instructions for Cloud SDK now. Be sure to check those instructions in case there are changes in the future.


You should also delete the ~/.config/gcloud folder.

Tags:

Gcloud