1. If there is an old version of go in the system, skip this step (check go version: go version)#
1. sudo rm -rf /usr/local/go
2. sudo apt-get remove golang
3. sudo apt-get remove golang-go
4. sudo apt-get autoremove
2. Install necessary components#
apt install wget
3. Get go installation package#
wget https://go.dev/dl/go1.20.4.linux-amd64.tar.gz
4. Unzip go#
tar -C /usr/local -xzf go1.20.4.linux-amd64.tar.gz
5. Set environment variables#
export PATH=$PATH:/usr/local/go/bin