删除使用go get安装的软件包 [英] Removing packages installed with go get
问题描述
在了解我需要设置我的GOPATH
之前,我运行go get package
下载了一个软件包,否则该软件包会使我的Go Go根目录变得肮脏(我更希望保持Go Go根目录的清洁并使核心与自定义分开).如何删除以前安装的软件包?
I ran go get package
to download a package before learning that I needed to set my GOPATH
otherwise that package sullies my root Go install (I would much prefer to keep my Go install clean and separate core from custom). How do I remove packages installed previously?
推荐答案
仅删除源目录和已编译的软件包文件是安全的.在$GOPATH/src
下找到源目录,在$GOPATH/pkg/<architecture>
下找到包文件,例如:$GOPATH/pkg/windows_amd64
.
It's safe to just delete the source directory and compiled package file. Find the source directory under $GOPATH/src
and the package file under $GOPATH/pkg/<architecture>
, for example: $GOPATH/pkg/windows_amd64
.
这篇关于删除使用go get安装的软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!