Stay organized with collections
Save and categorize content based on your preferences.
For installations completed using an OS package (such as apt-get or yum),
uninstall gcloud CLI using the OS package manager.
For Windows installations, execute the uninstaller.exe file in your
gcloud CLI directory.
To remove the gcloud CLI, follow these instructions:
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)'
Delete both of these directories.
Additionally, remove lines sourcing completion.bash.inc and
path.bash.inc in your .bashrc or equivalent shell init file, if you
added them during installation.
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.
Some systems may have Cache directories such as ~/Library/Caches/ on
Mac OS X. Find and delete these directories for your system:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Uninstalling the Google Cloud CLI\n\nFor installations completed using an OS package (such as `apt-get` or `yum`), uninstall gcloud CLI using the OS package manager.\n\nFor Windows installations, execute the `uninstaller.exe` file in your\ngcloud CLI directory.\n\nTo remove the gcloud CLI, follow these instructions:\n\n1. Locate your installation directory by running:\n\n gcloud info --format='value(installation.sdk_root)'\n\n Locate your user config directory (typically `~/.config/gcloud`\n on MacOS and Linux) by running: \n\n gcloud info --format='value(config.paths.global_config_dir)'\n\n2. Delete both of these directories.\n\n3. Additionally, remove lines sourcing `completion.bash.inc` and\n `path.bash.inc` in your `.bashrc` or equivalent shell init file, if you\n added them during installation.\n\n4. Review the contents of the `.boto` file in your home directory and remove\n the sections **\\[GoogleCompute\\]** and **\\[GSUtil\\]** . In addition, review the\n sections **\\[OAuth2\\]** and **\\[Credentials\\]** for settings that are no longer\n needed.\n\n5. Some systems may have `Cache` directories such as `~/Library/Caches/` on\n Mac OS X. Find and delete these directories for your system:\n\n find ~/Library/Caches/ -type d -name \"google-cloud-sdk\" | xargs -i rm -r \"{}\""]]