List Dependencies of All Installed Packages in Homebrew

List all dependencies for all installed packages:

brew deps --tree --installed

List all packages that are NOT dependencies of any other packages:

brew leaves

List all packages depending on specified package ‘pac’:

brew uses pac --installed

List all packages depending on all packages using ‘brew list’:

brew list | while read cask
do
	echo -en $cask'\t'
	brew uses $cask --installed | tr '\n' '\t'
	echo -en '\n'
done

Leave a Reply

Your email address will not be published. Required fields are marked *