brew update hangs

Posted on Updated on

Introduction

I update the Mac from macOS 10.15 to macOS 11.0, I found out that the homebrew hangs after running brew update. Running brew update --verbose said the brew update software hangs when fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask

Running brew doctor said my CommandLineTools is not updated. To fix this problem, we need to upgrade the CommandLineTools.

Since I upgraded the homebrew-core with an OLD CommandLineTools, the homebrew-core is also contaminated. I need to use brew update-reset to reset the homebrew-core module.

# Full script of fixing homebrew update error

# Reset
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install

# Reset homebrew-cask
brew untap homebrew/homebrew-cask
brew reinstall cask

# Reset homebrew-core
brew update-reset -d -v


Reference

https://github.com/Homebrew/homebrew-cask/issues/50586

Leave a comment