删除使用go get安装的软件包 [英] Removing packages installed with go get

查看:120
本文介绍了删除使用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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆