Member-only story

Trouble updating HomeBrew after MacOS upgrade

pi314tech
3 min readApr 18, 2024

I recently upgraded my macOS to Catalina 10.15.7(The max version supported for 2012 Macbook air as of this writing) and thereafter could not get Homebrew to update and it kept on failing with `/usr/local` must be writable! error. This article will help readers to recover from similar errors

So after the upgrade of macOS, my attempts to upgrade Homebrew failed with this weird error.

$ brew update
Error: /usr/local must be writable!

First impression, oh let me force it to upgrade and you know it, just add `sudo` which I know wasn’t the right way to fix the problem but it was just a knee jerk attempt to see if that error would go away. Thankfully Homebrew issued a warning(rightfully so) and I decided to fix it the right way.

$ sudo brew update
Error: Cowardly refusing to 'sudo brew update'
You can use brew with sudo, but only if the brew executable is owned by root.
However, this is both not recommended and completely unsupported so do so at
your own risk.

So to get this resolved, I followed below steps.

First was to uninstall Homebrew entirely

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" -- --path=/usr/local

One this was done, I was surprised that I ended up with some files that was not removed from the folder and I was left with below message

==> Homebrew uninstalled!
The

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

pi314tech
pi314tech

Written by pi314tech

Technology enthusiast, lifelong learner, developer, photographer and travel blogger

No responses yet

Write a response