Skip to content

Instantly share code, notes, and snippets.

@nikhita
Last active July 19, 2024 17:55
Show Gist options
  • Save nikhita/432436d570b89cab172dcf2894465753 to your computer and use it in GitHub Desktop.
Save nikhita/432436d570b89cab172dcf2894465753 to your computer and use it in GitHub Desktop.
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by:

$ sudo rm -rf /usr/local/go

2. Install the new version

Go to the downloads page and download the binary release suitable for your system.

3. Extract the archive file

To extract the archive file:

$ sudo tar -C /usr/local -xzf /home/nikhita/Downloads/go1.8.1.linux-amd64.tar.gz

4. Make sure that your PATH contains /usr/local/go/bin

$ echo $PATH | grep "/usr/local/go/bin"
@Tuanm
Copy link

Tuanm commented May 27, 2024

Thank you @Tuanm

What did you thank me for, bro? :'v

@CollinsWanjau
Copy link

After installing the latest go-system-wide, i get this version colloso@colloso-ThinkCentre-M73:~/Documents/Go/hello$ go version go version go1.20.3 linux/amd64

@catgoose
Copy link

catgoose commented Jul 6, 2024

Thank you @Tuanm

What did you thank me for, bro? :'v

Thanks chief

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment