brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: brew doctor checks your Homebrew setup for problems

Terminal
~/tips/tip-macos-brew-doctor

brew doctor

Scans your Mac for common Homebrew problems and suggests fixes.

When Homebrew starts acting odd on my Mac, I’d run one command before I go searching any forum: brew doctor. It looks over your system for things that commonly break Homebrew and tells you what it found.

The basic version needs no options:

brew doctor

If all is well, it says your system is ready to brew. If not, you get a list of warnings, usually with a hint about what to do. The manual also says it exits with a non-zero status when it finds a potential problem, so you can use it in a setup script:

brew doctor || echo "Homebrew wants attention"

Curious what it actually checks? brew doctor --list-checks prints the names of all the checks. You can pass one or more of those names as arguments to run only those checks, which is handy when you have fixed one warning and want to confirm it is gone without reading the whole report again.

The caveat is in the manual itself, and I like how honest it is: the warnings are mainly there to help the Homebrew maintainers debug when you file an issue. If everything you use Homebrew for works fine, they ask you not to worry and not to file an issue. So read the output as a list of suspects, not as a list of things you must fix. A warning about something you did on purpose can stay.

Further reading: Homebrew manpage

More Terminal tips ioreg -rn AppleSmartBattery | grep CycleCount Terminal can save your windows and tabs as a window group Export a Terminal profile to a .terminal file and import it on another Mac mc hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x700000029}]}' All Terminal tips (116) All topics

Link