我今天安装了 homebrew,但并不真正知道自己在做什么,现在我的 scikit-learn 包坏了。我想通过卸载自制程序来撤消所做的一切,并尝试按照此处的提示进行操作: https: //github.com/Homebrew/homebrew/wiki/FAQ
但是,我认为自制程序安装到 /usr/bin/local 中,而不是 /usr/bin/ 中,所以我不确定是否可以使用链接中的说明。
当我最初安装 homebrew ( ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)") 时,我收到以下消息:
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1
==> The following directories will be made group writable:
/usr/local/lib/pkgconfig
/usr/local/share/man/man3
/usr/local/share/man/man5
/usr/local/share/man/man7
Run Code Online (Sandbox Code Playgroud)
我可以直接删除里面的文件吗
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1
Run Code Online (Sandbox Code Playgroud)
我害怕在卸载过程中搞砸一些东西。顺便说一句,卸载自制程序是否会将我的系统恢复到以前的状态?我该怎么做呢?
这对我有用
官方brew卸载步骤:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Run Code Online (Sandbox Code Playgroud)
但这/usr/bin/ruby只是符号链接,以便找到您需要输入的红宝石
which ruby
Run Code Online (Sandbox Code Playgroud)
这会给你/snap/bin/ruby
那么就用这个:
/snap/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Run Code Online (Sandbox Code Playgroud)
小智 4
自制程序常见问题解答中对此进行了介绍:
https://docs.brew.sh/FAQ#how-do-i-uninstall-homebrew
它指定了一个您可以运行来执行此操作的脚本。您应该运行该脚本。截至目前,脚本内容如下:
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e
/usr/bin/which -s git || abort "brew install git first!"
test -d /usr/local/.git || abort "brew update first!"
cd `brew --prefix`
git checkout master
git ls-files -z | pbcopy
rm -rf Cellar
bin/brew prune
pbpaste | xargs -0 rm
rm -r Library/Homebrew Library/Aliases Library/Formula Library/Contributions
test -d Library/LinkedKegs && rm -r Library/LinkedKegs
rmdir -p bin Library share/man/man1 2> /dev/null
rm -rf .git
rm -rf ~/Library/Caches/Homebrew
rm -rf ~/Library/Logs/Homebrew
rm -rf /Library/Caches/Homebrew
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
34449 次 |
| 最近记录: |