How to remove outdated installed versions of Homebrew packages in MacOS?

The cleanup (brew cleanup) command will remove outdated installed package versions. To affect a particular package/formula, you may supply a formula name like so: brew cleanup $FORMULA

brew cleanup only cleans outdated package versions if you have the newest version installed, so first brew upgrade then brew cleanup

brew upgrade
brew cleanup

It saved me 5GB at /usr/local/

Tags:

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.