Fix Brew stuck/hangs updating in MacOs
The brew (Hombrebrew) package manager is a mush have tool for developers using macOs. It enables you to install, update, and manage a wide range of software packages from the command line. However, sometimes you might encounter issues when updating. If brew update command get stuck you can execute the following commands to fix it.
#!/bin/bash
# Full script for fixing homebrew update error
# Reset
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install
# Reset homebrew-cask
brew untap homebrew/homebrew-cask --force
brew reinstall cask
# Reset homebrew-core
brew update-reset -d -v
Download the GitHub Gist fix_brew_stuck_updating.bash
Background header image created using Dream Studio by stability.ai.
Prompt: Create an illustration of fixing Brew updating in MacOs
Found a snippet that saved your day? Consider dropping a tip!