I tried the answer here Removed golang but go command still works?, but it didn't work (I can still run go)
Currently, when I run which go I see this output
/usr/local/go/bin/go I think I had two installations of go as my GOPATH was pointing to another folder named gocode. I've now removed that folder, and the usr/local/go/bin/go folder.
I've also removed my GOPATH. However, I can still run go.
How do I uninstall go?
Update August 2019
Found the official uninstall docs worked as expected (on Mac OSX).
$ which go /usr/local/go/bin/go In summary, to uninstall:
$ sudo rm -rf /usr/local/go $ sudo rm /etc/paths.d/go Then, did a fresh install with homebrew using brew install go. Now, i have:
$ which go /usr/local/bin/go
You might try
rm -rvf /usr/local/go/ then remove any mention of go in e.g. your ~/.bashrc; then you need at least to logout and login.
However, be careful when doing that. You might break your system badly if something is wrong.
PS. I am assuming a Linux or POSIX system.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With