I have upgraded golang from version 1.6 to 2.6 in ubuntu with this command : sudo apt dist-upgrade golang
but when I run go version
it still shows old version. how I can make ubuntu to use newer version?
Run sudo apt purge golang
to remove your current installation.
Follow the Go Getting Started instructions to install a current, supported version of Go.