Skip to content

Instantly share code, notes, and snippets.

@mohae
Last active February 19, 2016 21:13
Show Gist options
  • Select an option

  • Save mohae/b34ccfe8d967d479db8f to your computer and use it in GitHub Desktop.

Select an option

Save mohae/b34ccfe8d967d479db8f to your computer and use it in GitHub Desktop.
upgrades go to current version; removes prior version artifacts
#!/bin/bash
# remove the old Go
sudo rm -rf /usr/local/go
# remove artifacts from prior version
rm -rf $GOPATH/bin/*
rm -rf $GOPATH/pkg/*
# download and extract Go to /usr/local/go/
# change the tarball for different version/arch
wget -qO- https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz | sudo tar xz -C /usr/local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment