Categories
Device

How to download macos updates using the terminal

Plus, how to do it all at once

Every once in a while, you’ll find that an update is available for either your macOS system or the apps installed on your machine. It’s important that you keep your system software and apps up to date. This ensures your system is stable and your apps are bug-free.

On a Mac machine, you have several ways to update the operating system and applications. The traditional way to get and install new updates is to use the official Mac App Store on your machine.

How to download macos updates using the terminal

However, you’re not tied to it to install your updates. You can also use the Terminal app to find, download, and install various updates on your machine. There are even configurable options letting you decide how these updates should be installed.

Update The macOS Version From Terminal

Terminal has a command that checks for all the available updates for macOS and allows you to download and install them on your machine. The command also lets you update Apple apps such as iTunes on your Mac.

What it doesn’t do though is to install updates for the third-party apps installed on your machine. For those apps, you’re going to need to install a package that is described in the later part of this guide.

Find Available macOS System Updates

The first thing you’ll want to do is check what updates are available for your macOS and Apple apps. Checking doesn’t necessarily mean downloading or installing updates. It’s just to give you an idea what needs to be updated on your Mac.

Launch the Terminal app using your preferred method on your Mac.

When the app launches, type in the following command and press Enter.

softwareupdate -l

How to download macos updates using the terminal

It’ll look for all the available updates and display them in your Terminal window. The information you’ll see include the app names, size of the update, whether the update is recommended or not, and whether the update requires rebooting your machine.

How to download macos updates using the terminal

You can also check the updates with Terminal and then install them from the App Store, if you want to do it that way.

Download macOS System Updates

After finding out what updates are available, you might want to download those updates to your Mac. Keep in mind that downloading also doesn’t require you to install the updates. You can just keep the updates downloaded and not install them right away.

    Launch the Terminal app and type in the following command and hit Enter.

softwareupdate -d -a

How to download macos updates using the terminal

  • It’ll download all the available updates but won’t install them. You’ll find these update files in the /Library/Updates/ folder on your Mac.

Install Downloaded macOS Updates

The updates you download using the Terminal command can’t be manually installed. These updates can only be installed using a command in the Terminal app.

To install them, you need to first find out the name of the update and then use that name below to get the update installed on your Mac.

    Launch the Terminal app, type in the following command, and hit Enter. Make sure to replace update-name with the name of the update you wish to install.

softwareupdate -i update-name

How to download macos updates using the terminal

It’ll let you know when the update is installed on your machine. This shouldn’t take too long as the update is already downloaded on your Mac and it just needs to be installed.

Download & Install All macOS Updates

What you did in the above sections was update things bit by bit. What if you want to find, download, and install all the macOS updates in one go? Well, Terminal has you covered.

There’s a command that lets you install all the available updates on your Mac in a single execution.

    Open the Terminal app and run the following command in it.

softwareupdate -i -a

How to download macos updates using the terminal

The command will get all updates installed and let you know when it’s done. This’ll take longer than the above methods as it first downloads all the updates and then installs them one by one on your machine.

Update Mac Apps From Terminal

Third-party apps that aren’t developed by Apple require different commands to be updated from the Terminal on your Mac. These app updates won’t show up when you run the commands mentioned above.

In order to be able to update all of your Mac Store Apps, you’re going to need to install Homebrew followed by ‘mas’ on your machine. It’ll then let you update your other apps.

Open the Terminal app and run the following command in it to install Homebrew.

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

How to download macos updates using the terminal

When Homebrew is installed, type in the following command and press Enter to install the mas utility.

brew install mas

How to download macos updates using the terminal

When mas is installed, you can run the following command to see a list of all the apps that can be updated using this utility.

mas list

How to download macos updates using the terminal

Type in the following command and press Enter to see all the apps that require an update.

mas outdated

How to download macos updates using the terminal

Run the following command to update all the outdated apps. It’ll first download updates for all the outdated apps and then install them so expect a good amount of time before it finishes.

mas upgrade

How to download macos updates using the terminal

Wait while the utility updates your apps. When it’s done, you can close the Terminal window.

You don’t necessarily need to keep mas and Homebrew installed on your Mac if you don’t plan to update your apps using this way in the future. Uninstalling them won’t affect the updated apps on your Mac so it’s safe to remove them if you want.

Mahesh has been obsessed with technology since he got his first gadget a decade or so ago. Over the last few years, he’s written a number of tech articles on various online publications including but not limited to MakeTechEasier and Android AppStorm. Read Mahesh’s Full Bio

Most of the time, you can re-download the current version of macOS via the Mac App Store, and older ones via these links:

However, I’ve run into a situation several times where the Software Update mechanism simply refuses to initiate a download:

How to download macos updates using the terminal

Thankfully, macOS installers can be downloaded via Terminal in macOS Catalina. This command will download the most recent version of macOS, depositing it in your Applications folder:

The softwareupdate command has some neat tricks up its sleeve, as pointed out by Armin Briegel:

The –fetch-full-installer flag has a sub-flag: –full-installer-version which allows you to download a specific version.

During my testing in the Catalina beta version I was able to download 10.15, 10.14.6, 10.14.5, and 10.13.6. I was not able to test if 10.13.6 would download the hardware specific build of 10.13.6 for the 2018 MacBook Pro, since I do not have that hardware.

So, to pull 10.13.6 down, you’d use:

softwareupdate –fetch-full-installer –full-installer-version 10.13.6

I wish Apple would just have a support document up with direct downloads for all of this stuff, but this tool is not a bad alternative.

Update: Don’t miss this documentation from JAMF for more on the subject.