C.W.K.
Stream
Lesson 03 of 05 · published

The Commands You'll Type Daily

~14 min · homebrew, commands, workflow, muscle-memory

Level 0Newbie
0 XP0/55 lessons0/16 achievements
0/80 XP to next level80 XP to go0% complete

Homebrew has dozens of commands, but eight of them carry 95% of daily work. Internalize these and you're fluent.

brew install installs a formula or, with --cask, a GUI app. brew uninstall removes one — and brew autoremove cleans up dependencies that nothing else needs anymore. brew search finds packages by name or regex. brew info shows the package's homepage, version, dependencies, and install path.

brew update fetches new formula definitions from GitHub. brew upgrade installs newer versions of installed packages. The two are commonly chained with brew cleanup to delete old downloaded archives — that three-command dance is the standard weekly maintenance routine.

brew doctor is the first command to run when anything breaks. It diagnoses 80% of common environment problems before you start guessing. brew services manages background processes — it's how you start PostgreSQL, Redis, or any other daemon you installed via Homebrew. brew bundle turns your installed packages into a Brewfile (a text manifest), and lets you reinstall the entire set on another Mac with one command.

Code

The eight daily commands·bash
# Install (formula or cask)
brew install git
brew install --cask firefox

# Search & inspect
brew search ^python      # regex search
brew info postgresql@16  # homepage, deps, install path, caveats

# Maintenance
brew update              # refresh formula definitions
brew upgrade             # upgrade all installed packages
brew cleanup             # delete old downloads

# Uninstall + cleanup orphans
brew uninstall some-tool
brew autoremove          # remove deps no one needs anymore

# Diagnostic
brew doctor              # run this FIRST when anything breaks
Background services — start, list, stop·bash
# Install a database
brew install postgresql@16

# Start it as a background service (auto-restart at login)
brew services start postgresql@16

# See what's running
brew services list

# Stop everything Homebrew is running
brew services stop --all
Brewfile — your Mac as a single text file·bash
# Generate a Brewfile from your current install state
brew bundle dump --describe --file=~/Brewfile

# On a fresh Mac, restore everything in one command
brew bundle install --file=~/Brewfile

# Check what's missing or extra vs the Brewfile
brew bundle check --file=~/Brewfile

External links

Exercise

Run 'brew bundle dump --describe --file=~/Brewfile' and open the resulting file in your editor. Read every line — each one is a tool you've decided is worth installing on every Mac you own. If anything in there surprises you ('I never use that?'), uninstall it and dump the Brewfile again. Commit ~/Brewfile to git in your dotfiles repo if you have one.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.