Developer Forums relocated!

Need help with Apple Developer tools and technologies? Want to share information with other developers and Apple engineers? Visit Developer Forums at Apple.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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
Question marked as Best reply

Posted on Jun 10, 2022 12:54 PM

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.

1 reply
Question marked as Best 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.

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 ID.