Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Easy way to have Homebrew list all package dependencies

Is there anyway to have the command brew show all the installed or optional dependencies for any given package? It would also be helpful to see which of the install packages are themselves the dependencies of others packages.

like image 625
oliver Avatar asked Dec 08 '16 00:12

oliver


People also ask

How do I see what packages are installed in Homebrew?

Packages installed using Homebrew are all installed in a specific folder. Typically it's /usr/local/Cellar . If you don't find this folder, run brew --prefix to find the correct folder prefix. On my system, this command returned /usr/local , the place where the Cellar folder can be found.

Where does Homebrew install dependencies?

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).

How to list all installed packages by homebrew in Linux?

brew list: This is the basic command to list all installed packages by homebrew. It lists down all packages like below: brew list. brew list —cask: brew list —cask will list down all the items installed by using homebrew cask: brew list --cask brew outdated: brew outdated is used to list down all outdated packages. For example:

How to list all outdated packages in homebrew?

brew outdated is used to list down all outdated packages. For example: We can also use brew outdated —cask to use the same command with homebrew cask. This command shows all the packages and the dependency packages installed.

Is there a way to see dependencies in Brew?

I found the brew deps --tree switch is also very helpful to visualize dependencies just in the command line. From the official doc: brew deps --tree [--1] [filters] [--annotate] (formulae|--installed): Show dependencies as a tree.

What does brew outdated list —cask do?

brew list —cask will list down all the items installed by using homebrew cask: brew outdated is used to list down all outdated packages. For example: We can also use brew outdated —cask to use the same command with homebrew cask.


1 Answers

brew deps --tree --installed 

Thanks to rob-kovacs for suggesting the --tree addition

See this super helpful article for details: https://blog.jpalardy.com/posts/untangling-your-homebrew-dependencies/ Especially if you're interested in creating a graph of the dependency tree.

like image 128
Eric Dobbs Avatar answered Sep 21 '22 17:09

Eric Dobbs