Skip to content

Instantly share code, notes, and snippets.

@alexclst
Last active March 15, 2023 02:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexclst/f0a2c85b0874cd7c08410c6031076c33 to your computer and use it in GitHub Desktop.
Save alexclst/f0a2c85b0874cd7c08410c6031076c33 to your computer and use it in GitHub Desktop.
Homebrew Update
#!/bin/sh
# updates Homebrew and installed packages
# requires being run as admin or root user
# here for reference as to the steps, but not run as script in launchd anymore
# partly because Homebrew updates itself anytime you install a new package these days
/bin/date
/opt/homebrew/bin/brew update
/opt/homebrew/bin/brew upgrade
/opt/homebrew/bin/brew upgrade --cask
/opt/homebrew/bin/brew cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment