Can't update or upgrade Homebrew

 can no longer run either brew upgrade or brew update: both abort with


Error: homebrew-core is a shallow clone. To `brew update` first run:
  git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" fetch --unshallow


MacBook Air (2020 or later)

Posted on Jun 10, 2022 9:58 AM

Reply
1 reply

Jun 10, 2022 12:54 PM in response to rootbakarattacker

Following assumes Monterey or earlier, and not Ventura…


What happens after invoking the specified git command?


Failing that, try brute-force updating Homebrew core:

cd /usr/local/Homebrew/Library/Taps/homebrew/
rm -rf homebrew-core
git clone https://github.com/Homebrew/homebrew-core.git


Failing that, try deleting the contents of /usr/local/Homebrew entirely, and re-downloading Homebrew, and testing again.


If you’ve gone through all that, check with the folks that support Homebrew. This is their app, and they know it best.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Can't update or upgrade Homebrew

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.