How to uninstall Go on Windows
Go's uninstaller removes its own program folder and nothing else; everything you built with go get or go mod lives under your user profile and is never touched. This guide covers Go installed machine-wide from the GoLang.Go winget package.
Close anything using Go first
Close any terminal, IDE or build tool running go build, go run or gopls. Check Task Manager (Ctrl+Shift+Esc) for go.exe or gopls.exe before you uninstall.
Remove the app with its own uninstaller
Go to Settings › Apps › Installed apps, find Go Programming Language, and choose Uninstall, or run:
winget uninstall --id GoLang.Go
Where the data lives
| Location | What it holds | What to do |
|---|---|---|
Program Files\Go |
The Go toolchain itself | Removed by the uninstaller |
%USERPROFILE%\go |
Your GOPATH by default: downloaded modules, built binaries from go install, and any of your own code you keep there |
Not touched by the uninstaller; back it up or keep it if you plan to reinstall Go |
%LOCALAPPDATA%\go-build |
The build cache Go maintains for faster rebuilds | Safe to remove; Go rebuilds it as needed |
The GOPATH default is documented by the Go project as %USERPROFILE%\go; this test did not build anything with Go, so that folder and the build cache were not exercised.
Check the result
Run these read-only commands after the uninstall finishes, ideally from a new terminal window:
go version
winget list --id GoLang.Go
Test-Path "$env:ProgramFiles\Go"
Test-Path "$env:USERPROFILE\go"
go versionfailing with "not recognized" means Go is gone from your PATH; printing a version means either the uninstall did not finish or another Go install is still on your machine.- A completed
winget listquery with no match means the package record is gone; a matching row means the uninstall did not finish. Test-Path "$env:ProgramFiles\Go"returningFalsemeans the program folder is gone;Truemeans files remain there.Test-Path "$env:USERPROFILE\go"returningTruemeans your GOPATH is still there, which is expected unless you removed it yourself; it can hold your own code, so check what's inside before deleting anything.
If you installed it with winget
winget uninstall runs the same MSI uninstaller Settings › Apps uses and removes the same program files; it does not touch %USERPROFILE%\go, the build cache, or any project you built with Go.
What Mole lists
For Go installed machine-wide from winget, the uninstall review lists nothing: the MSI uninstaller removes Program Files\Go by itself, so there is nothing left for Mole to offer. Mole also does not show the program folder as a row on its own for this app, because the installer's registry entry does not record an install location; check Program Files\Go yourself if you want to confirm it is gone. Your GOPATH and build cache are not part of this list either way.
What this test covered
Tested with Go 1.27.0 installed through winget from the arm64 MSI package, machine scope, elevated. No code was built or modules downloaded during the test.
