How to Update Apps on Mac Using Terminal

Update Apps Terminal Mac Featured

Learning how to update apps on Mac using Terminal can significantly streamline the maintenance of multiple Macs and, as a result, reduce your workload. Using a combination of system commands and open-source repositories, you can update both macOS software and Mac App Store software using Terminal.

Install macOS System and Software Updates Using Terminal

You can update your Mac using Terminal and the softwareupdate tool. This tool installs the same system and software updates found in the Software Update section of the System Settings app, and many users have reported it to be faster than the System Settings app.

To use it, launch the Terminal app from Application -> Utilities. Enter the softwareupdate -l command to list available updates. If updates are there, softwareupdate will display them. 

Softwareupdate List Available Updates

To install all available updates, execute sudo softwareupdate -ia --verbose. This command runs the softwareupdate tool with administrator privileges and tells it to install all updates while providing a detailed view of the update progress. You will be asked to enter your administrator password, then just wait for the update process to finish.

Softwareupdate Tool Verbose Installation Of Updates

Softwareupdate Flags

The behavior of the softwareupdate tool can be modified using a variety of different flags, some of which we’ve already used in the previous section of this article. Below is a list of commonly used flags:

  • The --verbose flag is optional, but it will give live status reports as updates are installed. If you have many updates to process, this flag will keep you abreast of the current status.
  • The -i flag stands for “install” and will begin the installation process for selected apps.
  • The -a flag stands for “all.” It will install all available updates.
  • The -r flag stands for “recommended.” For example, softwareupdate -ir will install only “recommended” updates.
  • The -h flag stands for “help” and will reveal all available commands.
  • To install just one update, use softwareupdate -i [package name]. For example, softwareupdate -i RemoteDesktopClient-3.9.2 will install only the RemoteDesktopClient 3.9.2 update.
  • To ignore specific updates, use the --ignore flag. For example, softwareupdate --ignore RemoteDesktopClient-3.9.2 will hide the 3.9.2 update of RemoteDesktopClient.

Update Mac App Store Software Using Terminal

By default, macOS does not contain a command line utility for updating apps from the Mac App Store. However, you can install Dmitry Rodionov’s mas utility to add this functionality to your Mac.

Launch the Terminal app (Application -> Utilities), and, if you haven’t already, install Homebrew using the following Terminal command:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Homebrew is an open-source package manager that makes it easy to install, update, and manage third-party software from Terminal. Let’s immediately put it to use by installing the aforementioned mas utility using the brew install mas command. When the installation is complete, type in mas to see a list of all available mas commands.

Mas Tool Listing All Available Commands In Terminal

For example, enter mas list to see a list of installed Mac App Store apps, or type mas outdated to see only apps with available updates. To update all apps, simply use mas upgrade. The process will update each app and notify you upon completion.

Mas Updating All Outdated Apps

This guide has taught you how to update apps on Mac using Terminal commands. For those managing multiple Macs, this approach is not only time-saving, but also offers a higher degree of control over the update process. To further enhance your command line skills and discover more useful Terminal commands for your Mac, explore our article on useful Mac terminal commands you should know.

All images and screenshots by David Morelo.

Is this post useful?
Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

David Morelo
David Morelo - Staff Writer

David Morelo is a professional content writer in the technology niche, covering everything from consumer products to emerging technologies and their cross-industry application. His interest in technology started at an early age and has only grown stronger over the years.