Mac Homebrew – Update all packages at once

With the release of Mountain Lion, some brew packages have stopped working… because they need updates!

Updating all my brew packages installed via mac homebrew was my solution, unfortunatly there is no easy way to do this built-in.

Run this command, it first updates homebrew itself then looks for outdated formulas and updates them one by one. (Since there is no built-in command to update all brew packages at once)

brew update; brew list | xargs brew upgrade
Afterwards, you can issue a

brew outdated
to confirm that there are no packages requiring updates.

brew upgrade brew outdated