如何让 homebrew
列出为软件包安装的所有文件?例如,当我为 exim 包运行 brew list
时,我得到这些文件:
$ 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
但是有一些文件不在上面的列表中。例如:
$ ls -ld /usr/local/etc/exim.conf
-rw-r--r-- 1 hanxue admin 35904 Sep 25 21:11 /usr/local/etc/exim.conf
只需添加 -v
或 --verbose
,例如:
$ brew ls --verbose exim
如果有问题的软件包是 cask 安装(例如 mactex),那么您需要在 list/ls 命令中包含 --cask
参数,例如
brew ls --cask exim
注意:如果您不包含 --cask
参数,则使用木桶通常会报告错误。并且使用 --cask
参数它可能只列出安装程序 dmg,因为它似乎没有跟踪生成的安装文件。
/usr/local/etc
和其他位置下的配置文件将保留,除非手动删除它们。 Homebrew 只关心程序本身,而不是程序留下的设置或其他残余。 Here is a section from the MacPorts documentation explaining how they avoid this problem.brew ls -v exim
。