Table of Contents
In this post, we’ll using the Terminal to update a Mac and can dump the traditional way of updating macOS. Moreover, if you are using an older Mac device, you can download updates quickly, this process update macOS in the background. In simple words, this means you can continue using the Mac when the updates are installed. This makes updating Mac via Terminal a great idea.
How to update macOS via the Command Line
1. Type Terminal in Spotlight or open Finder and head to Applications > Utilities > Terminal.
2. Type the following command to get the list of available updates for this Mac.
Wait for it to search for available updates present in Apple’s servers. If no updates are available, you will get a message No updates available. However, if updates are available. The Terminal will show a list of updates with the file size.
flame:~ bonben$ softwareupdate -l Software Update Tool Finding available software Software Update found the following new or updated software: * iTunes Device Support Update- iTunes Device Support Update ( ), 105805K [recommended] [restart] * macOS 10.14.6 Update- macOS 10.14.6 Update ( ), 2545010K [recommended] [restart] * macOS Mojave Security Update 2021-005-10.14.6 macOS Mojave Security Update 2021-005 (10.14.6), 1735906K [recommended] [restart] * Safari14.1.2MojaveAuto-14.1.2 Safari (14.1.2), 93397K [recommended]
3. You can install the updates one by one or install all updates at once.
###Install a specific update sudo softwareupdate -i "iTunes Device Support Update" ###Install all available updates at once sudo softwareupdate -i -a
If restarting the Mac is required to install updates, Terminal will show a message.
flame:~ bonben$ softwareupdate -i -a Software Update Tool Finding available software Downloaded iTunes Device Support Update Downloaded macOS 10.14.6 Update Installing iTunes Device Support Update, macOS 10.14.6 Update Done with iTunes Device Support Update Done. You have installed one or more updates that requires that you restart your computer. Please restart immediately. To automate the restart process with softwareupdate(8), use --restart.
Or you can run the below command to allow Terminal to restart Mac automatically when finishing update.
softwareupdate -i -a --restart