Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Homebrew: list the packages installed from taps?

Tags:

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?

like image 866
ivan Avatar asked Jun 04 '17 17:06

ivan


People also ask

How do I check my brew taps?

The brew tap command brew tap <user/repo> makes a clone of the repository at https://github.com/<user>/homebrew-<repo> into $(brew --repository)/Library/Taps . After that, brew will be able to work with those formulae as if they were in Homebrew's homebrew/core canonical repository.

What is brew tap command?

brew tap adds more repositories to the list of formulae that brew tracks, updates, and installs from. By default, tap assumes that the repositories come from GitHub, but the command isn't limited to any one location.

Where can I find Homebrew files on Mac?

By default, Homebrew will install all packages in the directory /usr/local/Cellar/ , and also creates symbolic links at /usr/local/opt/ and /usr/local/bin/ (for executable files).

What is cask in Homebrew?

brew cask is an extension to brew that allows management of graphical GUI applications. Homebrew Cask extends Homebrew and brings its elegance, simplicity, and speed to OS X applications and large binaries alike. Cask deals with a mixture of software and licences.


2 Answers

I found a couple ways that work.

brew list --full-name 

Slower, but a little more informative:

brew info $(brew list) | grep '^From:' | sort 
like image 115
ivan Avatar answered Sep 20 '22 15:09

ivan


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 
like image 44
klaus Avatar answered Sep 19 '22 15:09

klaus