You can find out everything about a Homebrew package, not just if it’s installed, but its dependencies, build options, and even where it came from.

Let’s look at brew info node.

$ brew info node
==> node: stable 20.11.0 (bottled), HEAD
JavaScript runtime
https://nodejs.org/
/usr/local/Cellar/node/20.11.0 (1,843 files, 50.9MB) *
  Poured from bottle on 2024-02-15 at 10:30:00
From: https://github.com/Homebrew/homebrew-core/blob/2024-02-15/Formula/n/node.rb
==> Dependencies
Build: pkg-config ✘
Required: makedepend ✘
Optional: python@3.11 ✘
==> Options
--HEAD: Install the latest commit from node's git repository
==> Caveats
To install and use the modern `npm` (which is bundled with node), you may want to:
  `npm install -g npm@latest`
and then `ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm`

... (more output)

This output tells you a lot. The first line shows the package name (node), its current stable version (20.11.0), that it was installed from a pre-compiled "bottle" (meaning Homebrew didn’t have to compile it from source), and that there’s a development version available (HEAD).

Below that, you see the installation path (/usr/local/Cellar/node/20.11.0), the number of files it installed, and its size. The asterisk (*) indicates it’s currently installed. The From: line points to the exact file in the Homebrew core repository that defines how to install this package, which is incredibly useful for debugging or understanding custom installations.

Then come Dependencies. This section lists what other Homebrew packages are required (Required), optional (Optional), or needed for building (Build). The next to pkg-config, makedepend, and python@3.11 means these dependencies are not currently installed on your system. Homebrew will try to install them automatically when you install node if they are Required or Build, or if you explicitly request them.

Options details any flags you could have used during installation. --HEAD means you could have installed the absolute latest, bleeding-edge code from the project’s Git repository instead of the stable release.

Finally, Caveats provides important post-installation instructions or notes. For node, it suggests how to upgrade the bundled npm (Node Package Manager) to the latest version and create a symlink so you can use it directly from your command line.

The brew info command is your primary tool for understanding what a package is, how it’s configured, and what its relationship is to other software on your system. It’s the first place to look when something isn’t working as expected with a Homebrew-installed application.

You’ll next want to understand how to manage these dependencies more actively.

Want structured learning?

Take the full Homebrew course →