CmdKeys LogoCommand Quiz

Homebrew Command Practice

Homebrew is the missing package manager for macOS (and Linux). This track tests your muscle memory for managing command-line formulas, tapping third-party repositories, installing GUI applications via casks, and keeping your system healthy with cleanup and doctor commands.

Command Reference

manage

CommandDescription
brew listList all installed formulae.
brew search <text>Perform a substring search of formulae and casks matching the given text.
brew uninstall <formula>Uninstall a previously installed package.
brew install <formula>Install a command-line package (formula).
brew info <formula>Display detailed information about a formula, including dependencies and installation caveats.
brew upgrade <formula>Upgrade only the specified formula to its newest version.

maintain

CommandDescription
brew outdatedShow formulae and casks that have an updated version available.
brew doctorCheck your system for potential problems and output diagnostic warnings.
brew updateFetch the newest version of Homebrew and all formulae from GitHub (updates the local package index).
brew upgradeUpgrade all outdated and unpinned formulae and casks to their latest versions.
brew cleanupRemove older versions of installed formulae and clear old downloads from the cache.
brew pin <formula>Prevent the specified formula from being upgraded automatically.
brew unpin <formula>Allow the specified formula to be upgraded again.

cask

CommandDescription
brew install --cask <cask>Install a macOS GUI application.
brew uninstall --cask <cask>Uninstall a macOS GUI application.
brew list --caskList all currently installed casks (GUI applications).
brew reinstall --cask <cask>Reinstall the given Cask, useful if an application is corrupted.

tap

CommandDescription
brew untap <user/repo>Remove a given tap from your local repository list.
brew tapList all currently tapped third-party repositories.
brew tap <user/repo>Tap a formula repository from GitHub.
brew tap <user/repo> <URL>Tap a formula repository from a specified non-GitHub URL.

Key Use Cases

  • Install a command-line tool like wget or git using brew install
  • Install a GUI application like Google Chrome using brew install --cask
  • Understand the critical difference between brew update and brew upgrade
  • Diagnose local environment issues and missing dependencies using brew doctor
  • Reclaim disk space by removing stale lock files and outdated packages with brew cleanup

Frequently Asked Questions

What is the difference between brew update and brew upgrade?

brew update fetches the newest version of Homebrew and all formulae from GitHub, updating your local package index. brew upgrade actually downloads and installs the newer versions of the packages you already have installed.

What is a Homebrew Cask?

While standard Homebrew formulae deal with command-line software, Homebrew Cask is an extension that allows you to install macOS native GUI applications (like browsers, IDEs, and chat apps) directly from the command line.

What does brew tap do?

brew tap allows you to add third-party repositories to your Homebrew installation. Once tapped, you can install software from those repositories just as you would from the core Homebrew list.

Ready to master Homebrew commands?

Test your muscle memory with our spaced-repetition quiz system. Free forever.

Start Practice Now →