如何卸载自制软件? [英] How to uninstall homebrew?

查看:96
本文介绍了如何卸载自制软件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我今天没有真正知道自己在做什么就安装了自制软件,现在我的scikit-learn软件包已损坏.我想通过卸载homebrew撤消所做的一切,并尝试按照此处的提示进行操作: https://github.com/Homebrew/homebrew/wiki/FAQ

I installed homebrew today without really knowing what I was doing, and now my scikit-learn package is broken. I want to undo everything that I did by uninstalling homebrew, and tried following the tips here: https://github.com/Homebrew/homebrew/wiki/FAQ

但是,我认为自制软件安装在/usr/bin/local中,而不是/usr/bin/中,因此我不确定我是否可以使用链接中的说明.

However, I think homebrew installed into /usr/bin/local, and not /usr/bin/, so I'm not sure I can use the instructions in the link.

当我最初安装自制软件(ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)")时,收到以下消息:

When I initially installed homebrew (ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"), I got the following messages:

==> 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

我可以删除

/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1

我对在卸载过程中搞砸了有些恐惧. 顺便说一句,卸载自制程序甚至可以将我的系统还原到以前的状态吗?我将如何去做?

I'm terrified of screwing something up in the uninstallation process. Incidentally, would uninstalling homebrew even restore my system to what it was before? How would I go about doing that?

推荐答案

自制软件常见问题解答对此进行了介绍:

This is covered in the homebrew FAQ:

https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/FAQ.md#how-do-i-uninstall-homebrew

它指定您可以运行以执行此操作的脚本.您应该运行该脚本.截至目前,脚本中显示的内容如下:

It specifies a script you can run to do it. You should run that script. As of right now, the script says something like:

#!/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

这篇关于如何卸载自制软件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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