删除了golang但go命令仍然有效?

I'm running Mac OSX Yosemite.

I'm trying update from golang 1.4 to golang 1.6. I uninstalled golang but I noticed I could still run the go command go version = go1.4.2 darwin/amd64. Why is this so?

The directions aren't super clear IMO. They say

  1. To remove an existing Go installation This is usually /usr/local/go (done) Remove etc/paths.d/go
  2. I edited the bash by running go version go1.4.2 darwin/amd64

I ran source ~/.bash_profile and that updated the env variables.

You can try this

sudo apt-get remove golang-go

Then do this

sudo apt-get remove --auto-remove golang-go

I was running into the same issue. I ended up with this solution:

cd /usr/local/bin
rm go

Removes the 'go' command

Then go back to golang.org and re-download the newest version, run the installer and when you run the 'go' command it will display 1.12.9 (As of writing this post).