Upgrade all expired homebrew packages

brew outdated | cut -f1 | xargs brew upgrade
You probably want to run `brew update` before you run this command
Sample Output
==> Upgrading 24 outdated packages, with result:
cairo 1.14.0, ffmpeg 2.4.3, gcc 4.9.2, geoip 1.6.3, git-annex 5.20141024, gnupg 1.4.18_1, gnutls 3.3.10, icu4c 54.1, libassuan 2.1.3, libevent 2.0.21_1, libgpg-error 1.17, mercurial 3.2.1, mobile-shell 1.2.4_2, monit 5.10, node 0.10.33, objective-caml 4.02.1_1, opam 1.2.0_1, pcre 8.36, pngcrush 1.7.78, python3 3.4.2_1, sane-backends 1.0.24_1, sqlite 3.8.7.1, wget 1.16, youtube-dl 2014.11.04
==> Upgrading cairo
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/cairo-1.14.0.mavericks.bottle.1.ta
######################################################################## 100.0%
...

1
By: wires
2014-11-16 09:51:50

These Might Interest You

  • As of March 7, 2012: brew update - downloads upgraded formulas brew upgrade [FORMULA...] - upgrades the specified formulas brew outdated - lists outdated installations Note updating all packages may take an excruciatingly long time. You might consider a discriminating approach: run `brew outdated` and select specific packages needing an upgrade. For more information see homebrew's git repository: https://github.com/mxcl/homebrew Show Sample Output


    11
    brew update && brew upgrade `brew outdated`
    farazyashar · 2012-03-07 14:26:41 1
  • More information about what homebrew is all about: http://github.com/mxcl/homebrew


    -6
    brew update && brew install `brew outdated`
    zeroathome · 2010-02-11 12:17:24 4

  • 3
    brew update && brew upgrade
    lime · 2014-05-04 08:47:15 0
  • # AllInOne: Update what packages are available, upgrade to new versions, remove unneeded packages # (some are no longer needed, replaced by the ones from ap upgrade), check for dependencies # and clean local cached packages (saved on disk but not installed?,some are needed? [this only cleans unneeded unlike ap clean]). # aliases (copy into ~/.bashrc file): alias a='alias' a ap='apt-get' a r='ap autoremove -y' a up='ap update' a u='up && ap upgrade -y --show-progress && r && ap check && ap autoclean' # && means "and run if the previous succeeded", you can change it to ; to "run even if previous failed". I'm not sure if ap check should be before or after ap upgrade -y, you can also change the alias names. # To expand aliases in bash use ctrl alt e or see this ow.ly/zBKHs # For more useful aliases go to ow.ly/zBMOx


    0
    apt-get update && apt-get dist-upgrade -y --show-progress && apt-get autoremove -y && apt-get check && apt-get autoclean -y
    unixmonkey78577 · 2014-07-26 12:18:57 0

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: