How to Install and Uninstall Go on Linux, Mac and Windows? 🤔

April 17, 2023 ¿Ves algún error? Corregir artículo golang-wallpaper

In this article we'll see how to correctly install and uninstall Go on Linux, Mac and Windows. For this we'll follow the official documentation.

Installing Go on Linux 🐧 (Ubuntu, Debian, Kali, etc.)

To install Go on Linux we'll use our operating system's package manager. In this case we'll use Ubuntu 20.04.

~
sudo apt install golang

Once installed we can check the version of Go we have installed.

~
go version
 $ go version go1.19.1 darwin/arm64

Installing Go on Mac 🍎

To install Go on Mac we'll use our operating system's package manager. In this case we'll use Homebrew.

~
brew install go

Once installed we can check the version of Go we have installed.

~
go version
 $ go version go1.19.1 darwin/arm64

Installing Go on Windows 🖥️

To install Go on Windows we'll use the official Go installer.

  1. Download the Go installer from the official page.
  2. Run the installer and follow the steps it indicates.
  3. Once installed we can check the version of Go we have installed.
~
go version
 $ go version go1.19.1 darwin/arm64

Uninstalling Go on Linux 🐧 (Ubuntu, Debian, Kali, etc.)

To uninstall Go on Linux we'll use our operating system's package manager. In this case we'll use Ubuntu 20.04.

~
sudo apt remove golang

Uninstalling Go on Mac 🍎

To uninstall Go on Mac we'll use our operating system's package manager. In this case we'll use Homebrew.

~
brew uninstall go

Uninstalling Go on Windows 🖥️

To uninstall Go on Windows we'll use the official Go uninstaller.

  1. Run the uninstaller and follow the steps it indicates.
  2. Once uninstalled we can verify that we no longer have Go installed.
~
go version
 $ go version go1.19.1 darwin/arm64