System: Debian/Ubuntu/Fedora. Might work for others as well.
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
Go to the downloads page and download the binary release suitable for your system.
To extract the archive file:
$ sudo tar -C /usr/local -xzf /home/nikhita/Downloads/go1.8.1.linux-amd64.tar.gz
$ echo $PATH | grep "/usr/local/go/bin"
@wathika-eng Thanks for the ref! 🙏 Indeed, it works like a charm!
Previously, I had Go 1.24 manually installed (extracted, to be precise) in
$HOME/apps/go
.The script (
wget https://git.io/go-installer.sh && bash go-installer.sh
) discovered thatand just ask my confirmation to update it. And that's it! 🥰