• Modern UX

    Edit and navigate faster in the terminal with Warp's IDE-like input editor.

  • Warp AI

    AI suggests what commands to run and learns from your documentation.

  • Agent Mode

    Delegate tasks to AI and use natural language on the command line.

  • Warp Drive

    Save and share interactive notebooks, workflows, and environment variables.

  • All Features

List Installed Packages With Brew

Razvan Ludosanu

Razvan Ludosanu

Founder, learnbackend.dev

Published: 5/7/2024

About Terminus

The short answer

To get a list of all the CLI and GUI packages installed with Homebrew, you can use the following brew command:

$ brew list

Alternatively, you can use the --formula flag to list the CLI packages only:

$ brew list --formula

Or the --cask flag to list the GUI packages only,

$ brew list --cask

Checking an installed package

To check whether a particular package is already installed, you can append the package name to the brew list command as follows:

$ brew list <package>

Which will either output the local path of the package if it is installed:

$ brew list tree
 /usr/local/Cellar/tree/2.0.4/bin/tree
 /usr/local/Cellar/tree/2.0.4/share/man/man1/tree.1

Or an error message otherwise:

$ brew list awf
 Error: No such keg: /usr/local/Cellar/awf

Remind yourself of the syntax using AI Command Search

If you’re using Warp as your terminal, you can easily retrieve this command using the Warp AI Command Search feature:

Entering verify vim installed with brew in the AI Command Search prompt results in brew list vim, which you can then quickly insert into your shell by doing CMD+ENTER.

List the versions of installed packages

Since Homebrew allows you to install and manage multiple versions of a package at the same time, you can use the --versions flag to get a list of all the installed packages including their version numbers:

$ brew list --versions

Alternatively, you can filter out this list by only printing the list of packages with multiple versions installed using the --multiple flag:

$ brew list --versions --multiple

Finally, to get the version numbers of a particular package, you can append the package name at the end of this command:

$ brew list --versions <package>

Note that all of these above commands can be combined with the --formula and --cask flags as follows:

$ brew list --versions --multiple --formula

Written by

Razvan Ludosanu

Razvan Ludosanu

Founder, learnbackend.dev

Filed Under

Related Articles

Brew Uninstall Package

Remove installed packages with Homebrew

Homebrew
Razvan Ludosanu

Trusted by hundreds of thousands of professional developers

Download Warp to get started

Download for Mac