无法卸载已弃用的Homebrew公式

时间:2016-11-18 10:27:08

标签: homebrew

在弹性搜索的升级过程中,我注意到我安装了一个名为“elasticsearch13”的旧自制程序。

$ brew list | grep elastic
elasticsearch13

此公式已弃用且已删除。在尝试卸载此公式时,我收到了警告:

$ brew uninstall elasticsearch13
Error: No available formula with the name "elasticsearch13"

医生并没有告诉我太多......

$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
  /usr/local/include/python2.7/greenlet/greenlet.h

Warning: Your Xcode (8.0) is outdated.
Please update to Xcode 8.1 (or delete it).
Xcode can be updated from the App Store.

如何删除它?

1 个答案:

答案 0 :(得分:0)

不用担心,自己解决了:

查找github.com/Homebrew/homebrew-versions的最后一次提交(在删除之前)并下载它:

cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
curl https://raw.githubusercontent.com/Homebrew/homebrew-versions/2fabaf8210b1c9addc20e87da8c961aced58e2eb/elasticsearch13.rb > elasticsearch13.rb

运行卸载脚本:

brew uninstall elasticsearch13
rm elasticsearch13.rb