撤消 go install 安装的包
返回博客
后端开发#golang

撤消 go install 安装的包

如何删除 go install 安装的包

Jan 3, 20261 min read4

具体步骤

首先要明确需要删除的是哪个包,这里以 hello 为例,可以根据实际情况修改

  1. 使用 which 命令查看包路径
which hello

# output 
# /Users/fuxiaochen/go/bin/hello
  1. 使用 rm 令删除对应文件
rm -rf $(which hello)
  1. 再次执行命令,检查是否删除成功
hello

# output 出现 command not found 说明已删除
# command not found: hello

参考链接

觉得这篇文章有帮助?

点个赞,我会知道这类内容值得继续写。

评论(0)

发表评论

还没有评论,欢迎留下第一条留言。

撤消 go install 安装的包 - 付小晨