If you’re using macOS and you haven’t installed Homebrew yet—oh buddy, you’re missing out!
Homebrew is the Swiss army knife of package managers for macOS and Linux. It lets you install, manage, and update thousands of applications and developer tools with just a few commands. Whether you’re a developer, tester, or just a power user who likes things tidy and up-to-date, Homebrew is the way to go.
In this guide, we’ll walk through the essentials using a cheatsheet-style breakdown so you can get up and running fast. Let’s dive in. 🏊♂️
🔧 Getting Started with Installation
Before installing Homebrew, make sure Command Line Tools (CLT) are installed:
xcode-select --install
Then, install Homebrew with this one-liner:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
📦 Basic Commands You’ll Use Daily
Here are the bread-and-butter commands of Homebrew:
-
Install a package
brew install <package>
-
Uninstall a package
brew uninstall <package>
-
Upgrade all installed packages
brew upgrade
-
Check installed versions
brew list --versions
-
Help and diagnostics
brew help brew doctor
🔄 Keeping Everything Updated
-
Update Homebrew and formulae
brew update
-
See what’s outdated
brew outdated
-
Upgrade a specific package
brew upgrade <formula>
-
Pin a formula to prevent upgrades
brew pin <formula>
-
Unpin to allow upgrades again
brew unpin <formula>
📚 Repositories (aka Taps)
-
List all taps
brew tap
-
Add a GitHub tap
brew tap <user/repo>
-
Add a tap from URL
brew tap <user/repo> <url>
-
Remove a tap
brew untap <user/repo>
🍵 Managing Casks (Apps and GUI Tools)
-
Tap the cask repo
brew tap homebrew/cask
-
List installed casks
brew list --cask
-
Search casks
brew search <text>
-
Install a cask
brew install --cask <app>
-
Reinstall or uninstall
brew reinstall --cask <app> brew uninstall --cask <app>
🔍 Search, Install, Remove Formulae
-
List installed formulae
brew list
-
Search available formulae
brew search <keyword>
-
View info about a formula
brew info <formula>
-
Install or uninstall
brew install <formula> brew uninstall <formula>
🧹 Clean Up Unused Stuff
-
Clean old versions
brew cleanup
-
Clean specific formula
brew cleanup <formula>
-
Dry run (preview what will be removed)
brew cleanup -n
🚑 Helpful Diagnostics
-
Command help
brew help <command>
-
Check for potential issues
brew doctor
✨ Final Thoughts
Homebrew brings simplicity to a developer’s chaotic world. Whether you’re installing your favorite CLI tool or automating setup on a new Mac, this one package manager does it all. Bookmark this blog or keep the cheatsheet handy. You’re now a certified 🍺 Brewmaster!