Fixing Homebrew

Looking for a better way to manage your org's technical proposals?
DEPRECATED: This post may no longer be relevant or contain industry best-practices.

Boy does my Homebrew installation like to get messed up. Pretty much every time I do a big brew update I have to repair everything. This is what I typically have to do:

cd /usr/local
sudo chown -R USERNAME /usr/local/.git
sudo chown -R USERNAME /usr/local
sudo chown -RL mysql:mysql /usr/local/mysql/data
git pull
git reset --hard origin/master
brew update

My permissions often end up completely out of whack, and I also get a bunch of garbage in the /usr/local directory. This fixes the permissions and pulls the latest from homebrew and runs the update. Your mileage may vary.

Thomas Hunter II Avatar

Thomas Hunter II is a Software Engineer with 18+ years building scalable, production-grade systems. Deep expertise in Node.js, observability, and developer tooling, with a strong track record of driving architectural decisions, mentoring engineers, and improving customer facing technical documentation. Author of 5 books (including O'Reilly), certified by the OpenJS Foundation, and frequent international conference speaker.