Complete Homebrew Guide for Mac Users
Master Homebrew package management on macOS. Learn casks vs formulas, essential commands, and best practices.
Homebrew is the missing package manager for macOS that simplifies the installation of software on Mac systems. Think of it as an app store for developers and power users, accessible entirely through the command line.
Why Use Homebrew?
Homebrew automates the installation, updating, and management of software packages that aren't available in the Mac App Store. It handles dependencies, keeps software up-to-date, and provides a consistent way to manage development tools.
Benefits:
- • Easy installation and updates
- • Automatic dependency management
- • Access to 6,000+ packages
- • Command-line simplicity
Perfect for:
- • Developers and programmers
- • System administrators
- • Power users
- • Anyone needing CLI tools
Get Homebrew up and running on your Mac in just a few steps
System Requirements
• macOS 10.14 or higher
• Xcode Command Line Tools (the installer will prompt you to install these if needed)
• 64-bit Intel or Apple Silicon processor
Quick Install (One Command)
This script will guide you through the installation process, explaining each step along the way.
Post-Installation Setup
- 1. Add Homebrew to PATH - The installer will provide specific commands for your shell
- 2. Verify Installation - Run
brew doctor
- 3. Update Homebrew - Run
brew update
The two main types of packages in Homebrew
Aspect | Formulas | Casks |
---|---|---|
What they install | Command-line tools & libraries | GUI applications (apps with interfaces) |
Installation location | /usr/local/Cellar (Intel) or /opt/homebrew (Apple Silicon) | /Applications folder |
Install command | brew install [name] | brew install --cask [name] |
Examples | git, node, python, wget | Chrome, Slack, VS Code, Spotify |
Use case | Development tools, utilities, servers | Desktop applications, productivity tools |
Formulas are packages for command-line tools and libraries. They're the backbone of Homebrew, providing essential development tools.
Popular Development Tools
Database & Services
Common Formula Commands
- brew search [text] – Search for formulas
- brew info [formula] – Display information
- brew deps [formula] – Show dependencies
- brew uses [formula] – Show what depends on it
Casks extend Homebrew to install macOS applications distributed as binaries. Perfect for managing your Mac apps from the command line.
Productivity Apps
Developer Tools
Pro Tip
Use FastBrew to discover and install Homebrew casks with a beautiful visual interface!
Master these commands to effectively use Homebrew
Command | Description |
---|---|
brew install [package] | Install a formula or cask |
brew uninstall [package] | Remove a package |
brew list | List all installed packages |
brew search [text] | Search for packages |
brew info [package] | Display package details |
Command | Description |
---|---|
brew update | Update Homebrew and formula definitions |
brew upgrade | Upgrade all outdated packages |
brew outdated | List packages with available updates |
brew cleanup | Remove old versions and clear cache |
brew doctor | Check system for potential issues |
Recommended: Run maintenance commands weekly to keep your system clean and up-to-date.
Command | Description |
---|---|
brew tap [user/repo] | Add third-party repositories |
brew services list | List background services |
brew pin [formula] | Prevent formula from being upgraded |
brew leaves | List installed formulas not depended on by others |
brew bundle | Install packages from a Brewfile |
🔧 Permission Issues
sudo chown -R $(whoami) $(brew --prefix)/*
Fix ownership of Homebrew directories
🧹 Deep Clean
brew cleanup --prune=all
Remove all cached downloads and old versions
🔄 Reset Homebrew
brew update-reset
Reset Homebrew to a pristine state
Do's ✅
- • Run
brew update
before installing - • Use
brew doctor
when issues arise - • Keep Homebrew updated regularly
- • Clean up old versions with
brew cleanup
- • Use casks for GUI applications
Don'ts ❌
- • Don't use sudo with brew commands
- • Don't manually delete formula files
- • Don't ignore brew doctor warnings
- • Don't mix Homebrew with other package managers
- • Don't install duplicates (check with
brew list
)
Discover and install amazing macOS applications with FastBrew's visual interface