Skip to content

Instantly share code, notes, and snippets.

@yuhui
Created May 16, 2025 10:43
Show Gist options
  • Save yuhui/86991a86336a6f6dcfa874fb70fe3479 to your computer and use it in GitHub Desktop.
Save yuhui/86991a86336a6f6dcfa874fb70fe3479 to your computer and use it in GitHub Desktop.
Update Homebrew's brew
#!/bin/zsh
echo "$ brew analytics off"
brew analytics off
echo "$ brew update"
brew update
source ~/.zprofile
echo "$ brew upgrade"
brew upgrade
echo "$ brew autoremove"
brew autoremove
echo "$ brew cleanup"
brew cleanup -s --prune=all
echo "$ brew doctor"
brew doctor
echo "$ rm -rf $(brew --cache)"
rm -rf $(brew --cache)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment