撤消 go install 安装的包
如何删除 go install 安装的包
具体步骤
首先要明确需要删除的是哪个包,这里以
hello为例,可以根据实际情况修改
- 使用
which命令查看包路径
which hello
# output
# /Users/fuxiaochen/go/bin/hello
- 使用
rm令删除对应文件
rm -rf $(which hello)
- 再次执行命令,检查是否删除成功
hello
# output 出现 command not found 说明已删除
# command not found: hello