Homebrew: list the packages installed from taps?

吃可爱长大的小学妹 提交于 2019-12-18 11:49:35

问题


Over time, I've installed a number of packages with Homebrew, mostly from the default repo of formulae (homebrew-core), but some from other locations via brew tap.

Now I'm putting together some install scripts to make my dev environment more reproducible, and I'm trying to figure out which packages can be installed by a simple brew install and which require a brew tap beforehand.

The ability to query brew has proved useful for figuring out which options I used for each package, but not for this tap-related question. Is there a way to do this without manually going through each package and seeing where it's available?


回答1:


I found a couple ways that work.

brew list --full-name

Slower, but a little more informative:

brew info $(brew list) | grep '^From:' | sort



回答2:


This expression would return a list of installed 3rd party packages only:

brew list --full-name -1 | grep /

…for the respective list of taps in use, try:

brew list --full-name -1 | grep / | cut -d"/" -f1 -f2 | sort | uniq


来源:https://stackoverflow.com/questions/44357161/homebrew-list-the-packages-installed-from-taps

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!