Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Completely Uninstall Google Cloud SDK Mac

Tags:

gcloud

I cannot seem to find an uninstall script for the gcloud sdk.

I have already removed all the components (except for core which you cannot remove) via gcloud components remove [ID]

I noticed that there is a folder google-cloud-sdk located in my user folder, although this only has install scripts. I imagine there are other files or folders which should also be deleted.

Does anyone know of an uninstall script or all the files/folders to delete?

Thanks.

like image 972
Vasseurth Avatar asked Mar 31 '16 21:03

Vasseurth


People also ask

Can I delete Google Cloud SDK?

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. Delete both of these directories.

How do I remove Google Cloud SDK from Windows?

On the latest SDK, Under "C:\Program Files (x86)\Google\Cloud SDK" you should find an uninstaller (uninstaller.exe). Just execute it.

How can I tell if G Cloud is installed?

The first thing to do after successful installation is open your command line and type “gcloud” to check whether Cloud SDK has installed perfectly. Run “gcloud init”, it opens up a new browser window and asks to login into your google cloud account.


2 Answers

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.

like image 132
Valentin Avatar answered Sep 27 '22 23:09

Valentin


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

like image 37
laurenzlong Avatar answered Sep 27 '22 23:09

laurenzlong