我如何更新自制程序?

当我跑步的时候:

brew update

我收到一条消息说它在 /usr/local/.git/中初始化了一个空存储库,然后我得到了这个错误:

Screenshot

263727 次浏览
  • cd /usr/local
  • git status
  • Discard all the changes (unless you actually want to try to commit to Homebrew - you probably don't)
  • 清理干净
  • brew update

或者你可以通过重新安装来更新 brew

注意 : 这是一种笨手笨脚的方法,它将删除通过 brew 安装的所有应用程序!

尝试安装一个新鲜的酿造,它将告诉如何卸载。

在编写卸载程序的原始时间:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

Edit: As of 2020 to uninstall:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"

As of 2021 you can simply use brew update which updates homebrew itself.