⏱reading time: 4 min

Update Monday 2nd of April 2018: I decided to add to this post how to update the RubyGems since they are a key feature of Jekyll.

Update Thursday, 19th of April 2018 11.00 UTC+3: I added info about how to update on the CLI the App Store Apps and macOS software updates.

In the post about Homebrew I think I’ve already posted how I update Homebrew packages with a single comment in the terminal. However these days I update more software via terminal, mainly packages, because it’s really handy run just a couple of commands and then see how the software it’s updated automatically and easily.

Homebrew packages

To update Homebrew packages I run:

  • brew update updates Homebrew itself and download the last version of the formulae
  • brew upgrade updates the packages you have installed that have new formulae.
  • brew cleanup cleans the cache of old versions of packages.
  • brew prune clean the old symbolic links form /usr/bin/.
  • brew cu -ay uses /homebrew-cask-upgrade to update casks. -ay flag is all and yes update all outdated apps.
  • brew cask cleanup clean the old caches of the updated apps.

If for some reason you don’t want to update an specific package in Homebrew, you can pin in to an specific version or the current version.

R packages

To update R packages I run:

Update R packages on terminal is done using the command Rscript that allows us to send commands to R using the shell. I use the flag --vanilla that combine --no-save, --no-restore, --no-site-file --no-init-file and --no-environ. In other words a way to load R faster and with a standard configuration.

I like to run old.packages first because I like to see a list first of the packages I’m going to update and then update. I do this because some packages –data.table– need a different makevars than the rest of the packages so just in case I needed to change the makevars and rebuild that package.

I really think it would be cool to be able also pin packages in R, but I haven’t found any way to do so at system wide level. You can do easily at project level with the package Packrat. However, I really think it would be really nice to have email notifications when new versions of packages hit CRAN repository and some function to pin packages to the current version.

Python pip

To update all the packages from pip and pip itself I run:

I took the idea from here.

pip is the package manager for packages written in Python. You can read a little bit more on the Wikipedia.


RubyGems is a package manager for Gems that are packages written in Ruby language. Homebrew is written in Ruby and Jekyll too, the latter make use of several RubyGems for functionalities and extensions.

To update the RubyGems you run the following command:

App Store and macOS software updates

Although these ones are really easy and you can update them just using the Mac App Store app in your Mac, it’s possible to trigger the update checking and the update itself through CLI. macOS has a command that allow you to make this happen softwareupdate. You can run it like this:

As you see it’s quite thorough and you can see more options with running man softwareupdate.

If you want something more complex you can install mas-cli, which is a Mac App Store command line interface. Install you just run:

Then, you can run in your command line the following to update:


Leave a Reply

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