Skip to content

Instantly share code, notes, and snippets.

@kdabir
Last active July 27, 2024 20:19
Show Gist options
  • Save kdabir/6201840 to your computer and use it in GitHub Desktop.
Save kdabir/6201840 to your computer and use it in GitHub Desktop.
HomeBrew Maintenance (Mac OS X)

HomeBrew Maintenance

  • To list all the software/lib installed by brew $ brew list

  • to update an app $ brew upgrade appname

  • to see issues $ brew doctor

  • to update brew $ brew update

  • list outdated software/lib $ brew outdated

  • update all the outdated software/lib $ brew upgrade

  • to cleanup $ brew cleanup

@vmoutoussamy
Copy link

Might be a good idea to mention "brew cleanup"?

@kdabir
Copy link
Author

kdabir commented Feb 27, 2019

Might be a good idea to mention "brew cleanup"?

done.

@cfbastarz
Copy link

Is it really necessary to use sudo? I don't think this is either a good idea!

@sigmaenigma
Copy link

Homebrew gives a warning now when you attempt to use sudo:

Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.

@kdabir
Copy link
Author

kdabir commented Mar 10, 2021

yep, removed sudo

@MalekBouba
Copy link

I use this one-line command:
brew update && brew upgrade && brew doctor && brew cleanup
it update formulae, upgrade reps, check for issues & fix em if possible.

@ihavenothingbettertodo
Copy link

to update an app $ brew update appname

fix the error by revising to $ brew upgrade appname

ref: https://docs.brew.sh/FAQ#how-do-i-update-my-local-packages

@marianabocoi
Copy link

there is a typo in cleanup :)

@kdabir
Copy link
Author

kdabir commented Jan 19, 2024

thanks @ihavenothingbettertodo and @marianabocoi, have updated the gist :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment