How to Use the macOS softwareupdate Command to Install System Updates from the Terminal

The Silent Update Problem

In modern enterprise environments, System Administrators rarely walk around the office with USB drives to update Mac operating systems. Managing a fleet of MacBooks requires automation.

While Mobile Device Management (MDM) platforms like Jamf or Kandji are the industry standard for managing updates, there are times when an administrator needs direct, immediate control over a specific machine. Perhaps a developer’s Mac is stuck in an update loop, or a headless Mac Mini server sitting in a rack needs an urgent security patch applied remotely over SSH.

In these scenarios, relying on the graphical “System Settings > Software Update” panel is impossible. Instead, Apple provides a powerful, native command-line utility that allows you to query, download, and install system updates directly from the terminal: softwareupdate.

Step 1: Listing Available Updates

Before you install anything, you must know what updates Apple’s servers are offering for that specific hardware.

Open the Terminal (or connect via SSH) and run the following command to list all available updates:

softwareupdate -l

(Note: That is a lowercase ‘L’, for list).

The terminal will pause for a few moments as it connects to the Apple Software Update catalog. It will then print a list of available packages. The output usually looks like this:

Software Update found the following new or updated software:
* Label: Command Line Tools for Xcode-14.2
  Title: Command Line Tools for Xcode, Version: 14.2, Size: 700000K, Recommended: YES,
* Label: macOS Ventura 13.3.1-22E261
  Title: macOS Ventura 13.3.1, Version: 13.3.1, Size: 3200000K, Recommended: YES, Action: restart,

Pay close attention to the Label (the exact name of the package) and the Action: restart warning, which indicates the Mac will need to reboot to apply the patch.

Step 2: Downloading an Update (Without Installing)

Sometimes you want to stage an update during the day but install it later that night. You can command the Mac to download the massive installer file into its hidden cache without actually triggering the installation process.

Use the -d (download) flag, followed by the exact Label name in quotes:

softwareupdate -d "macOS Ventura 13.3.1-22E261"

The terminal will display a progress percentage as the gigabytes of data are pulled down from Apple’s CDN.

Step 3: Installing Updates

When you are ready to apply the patch, you use the -i (install) flag. Because installing system software modifies protected root directories, you must run this command with sudo privileges.

To install a specific package (whether it was pre-downloaded or not):

sudo softwareupdate -i "macOS Ventura 13.3.1-22E261"

The “Install Everything” Shortcut:
If you don’t want to type out specific labels and simply want the Mac to install every single recommended update (security patches, Safari updates, and minor OS bumps), use the -i -r flags (Install Recommended):

sudo softwareupdate -i -r

Step 4: Handling Required Restarts Automatically

As noted in Step 1, major OS updates require a system restart. If you run the standard install command over SSH, the terminal might hang, or the installation will pause in the background waiting for a user to physically click “Restart” on the GUI.

To completely automate a headless upgrade, you can force the Mac to reboot itself the absolute millisecond the installation completes. You do this by appending the -R (Restart) flag:

sudo softwareupdate -i -r -R

Warning: Use this command with extreme caution. The moment the download and staging are complete, the Mac will instantly terminate all running applications, kick off any connected SSH users, and reboot. Ensure the user’s work is saved before deploying this command across a network.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.