106

How can I get homebrew to list out all files installed for a package? For example, when I run brew list for the exim package, I get these files:

$ brew list exim
/usr/local/Cellar/exim/4.80.1/bin/exiwhat
/usr/local/Cellar/exim/4.80.1/bin/exiqsumm
/usr/local/Cellar/exim/4.80.1/bin/exiqgrep
/usr/local/Cellar/exim/4.80.1/bin/exipick
/usr/local/Cellar/exim/4.80.1/bin/exinext
/usr/local/Cellar/exim/4.80.1/bin/eximstats
/usr/local/Cellar/exim/4.80.1/bin/exim_tidydb
/usr/local/Cellar/exim/4.80.1/bin/exim_lock
/usr/local/Cellar/exim/4.80.1/bin/exim_fixdb
/usr/local/Cellar/exim/4.80.1/bin/exim_dumpdb
/usr/local/Cellar/exim/4.80.1/bin/exim_dbmbuild
/usr/local/Cellar/exim/4.80.1/bin/exim_ctl
/usr/local/Cellar/exim/4.80.1/bin/exim_checkaccess
/usr/local/Cellar/exim/4.80.1/bin/exim-4.80.1-3
/usr/local/Cellar/exim/4.80.1/bin/exim
/usr/local/Cellar/exim/4.80.1/bin/exigrep
/usr/local/Cellar/exim/4.80.1/bin/exicyclog
/usr/local/Cellar/exim/4.80.1/share/man/man8/exim.8

But there are files added to the system that is not in the list above. For example:

$ ls -ld /usr/local/etc/exim.conf 
-rw-r--r--  1 hanxue  admin  35904 Sep 25 21:11 /usr/local/etc/exim.conf
Hanxue
  • 10,413
  • 12
  • 81
  • 120

2 Answers2

84

Just add -v or --verbose, for example:

$ brew ls --verbose exim
kenorb
  • 118,428
  • 63
  • 588
  • 624
gsantovena
  • 1,011
  • 8
  • 11
  • 6
    While that recurses into installed directories and lists all the files they contain, it did not list the exim.conf file in the original post. It *was* added by the brew install action. – MSpreij Mar 27 '15 at 12:12
  • 2
    @MSpreij MacPorts actually does not have this problem since it tracks *all* files that will be installed before moving them into their final destination. Homebrew does not do this at all, so config files under `/usr/local/etc` and other places are there to stay unless one manually removes them. Homebrew only concerns itself with the program, not the settings or other remnants that the program leaves behind. [Here is a section from the MacPorts documentation explaining how they avoid this problem.](https://guide.macports.org/chunked/reference.phases.html#reference.phases.introduction) – GDP2 Jul 25 '18 at 00:58
0

If the package in question is a cask install (e.g. mactex) then you'll need to include the --cask arg to the list/ls command e.g.

brew ls --cask exim

Note: With casks if you don't include the --cask arg then it often reports an error. And with the --cask arg it may only list the installer dmg as it doesn't seem to track the resulting installed files.

Pierz
  • 4,579
  • 35
  • 45