Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: clean did not uninstall %userprofile%\go\bin\hello.exe #24864

Closed
Bernard-PvIT opened this issue Apr 14, 2018 · 3 comments
Closed

cmd/go: clean did not uninstall %userprofile%\go\bin\hello.exe #24864

Bernard-PvIT opened this issue Apr 14, 2018 · 3 comments

Comments

@Bernard-PvIT
Copy link

Please answer these questions before submitting your issue. Thanks!

What did you do?

Following the instructions on https://golang.org/doc/install?download=go1.10.1.windows-amd64.msi
I installed Go and built hello.exe
After go install, hello.exe was copied to %userprofile%\go\bin
go uninstall doesn't do anything. So much for intuition.
reading further it said use go clean
however, %userprofile%\go\bin\hello.exe still exists.

What did you expect to see?

an empty directory after go clean
I also expected go uninstall to work, go figure.

What did you see instead?

%userprofile%\go\bin\hello.exe still exists.

System details

go version go1.10.1 windows/amd64
running under cmd.exe
GOROOT=C:\Site\app\Go
Nothing terribly personal was in the following:
I presume auto-generated:

go version go1.10.1 windows/amd64
GOARCH="amd64"
GOBIN=""
GOCACHE="C:\Users\Berna\AppData\Local\go-build"
GOEXE=".exe"
GOHOSTARCH="amd64"
GOHOSTOS="windows"
GOOS="windows"
GOPATH="C:\Users\Berna\go"
GORACE=""
GOROOT="C:\Site\app\Go"
GOTMPDIR=""
GOTOOLDIR="C:\Site\app\Go\pkg\tool\windows_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\Berna\AppData\Local\Temp\go-build066044138=/tmp/go-build -gno-record-gcc-switches"
GOROOT/bin/go version: go version go1.10.1 windows/amd64
GOROOT/bin/go tool compile -V: compile version go1.10.1
@fkollmann
Copy link

Hi, I cannot confirm this behavior. If I call go clean -i it removes the file.

See:

The -i flag causes clean to remove the corresponding installed
archive or binary (what 'go install' would create).

Uninstalling Go will not remove any user profile data, as expected from a Windows Installer. You do not want to have all user files be removed as the user might upgrade to a newer version or reinstall.

@AlexRouSg
Copy link
Contributor

@fkollmann To be fair, the instructions at https://golang.org/doc/install says:

You can run go install to install the binary into your workspace's bin directory or go clean to remove it.

So I think it should be updated to say go clean -i

@gopherbot
Copy link

Change https://golang.org/cl/106986 mentions this issue: doc: clarify package uninstall/clean command

@agnivade agnivade changed the title go clean did not uninstall %userprofile%\go\bin\hello.exe cmd/go: clean did not uninstall %userprofile%\go\bin\hello.exe Apr 15, 2018
@golang golang locked and limited conversation to collaborators Apr 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants