Uninstalling Google Cloud SDK

To completely remove Cloud SDK, follow these instructions:

  1. Locate your installation directory by running:

     gcloud info --format='value(installation.sdk_root)'
    

    Locate your user config directory (typically ~/.config/gcloud on MacOS and Linux) by running:

     gcloud info --format='value(config.paths.global_config_dir)'
    
  2. Delete both these directories.

  3. Additionally, remove lines sourcing completion.bash.inc and paths.bash.inc in your .bashrc or equivalent shell init file, if you added them during installation.

  4. Review the contents of the .boto file in your home directory and remove the sections '[GoogleCompute]' and '[GSUtil]'. In addition, review the sections '[OAuth2]' and '[Credentials]' for settings that are no longer needed.