How to 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.
I'm using Ubuntu. I spent a whole morning fixing this, tried all different solutions, when I type go version, it's still there, really annoying... Finally this worked for me, hope this will help!
sudo apt-get remove golang-go
sudo apt-get remove --auto-remove golang-go