且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

自制软件:列出从水龙头安装的软件包?

更新时间:2022-12-13 09:24:28

我发现了几种可行的方法.

brew list --full-name

速度较慢,但​​提供的信息更多:

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

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?

I found a couple ways that work.

brew list --full-name

Slower, but a little more informative:

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