From time to time, you will find that an update is available for your macOS system or the applications installed on your machine. It is important that you keep your system software and applications up to date. This ensures your system is stable and your application is bug free.
On a Mac, you have several ways to update your operating system and apps. The traditional way to get and install new updates is to use the official Mac App Store on your machine.
However, you are not bound to it to install your updates. You can also use the Terminal application to find, download, and install various updates on your machine. There are even configurable options that let you decide how these updates are installed.
Update macOS version from terminal
Terminal has a command that checks for all available updates for macOS and allows you to download and install them on your machine. This command also allows you to update Apple apps like iTunes on your Mac.
However, what it doesn’t do is install updates for third-party apps installed on your machine. For those applications, you will need to install a package described later in this guide.
Find available macOS system updates
The first thing you need to do is check what updates are available for macOS and your Apple apps. Checking doesn’t necessarily mean downloading or installing updates. It’s just to give you an idea of what needs to be updated on your Mac.
Launch End application using your preferred method on the Mac.
When the application launches, enter the following command and press enter.
software update -l
It will search for all available updates and display them in your Terminal window. The information you’ll see includes the name of the app, the size of the update, whether the update is recommended, and whether the update requires a reboot of your machine.
You can also check for updates using Terminal and then install them from the App Store, if you want to do it that way.
Download macOS system updates
After learning what updates are available, you may want to download them to your Mac. Remember that downloading also does not require you to install updates. You can only keep downloaded updates and not install them right away.
- Launch End app and enter the following command and press enter.
software update -d -a
- It will download all available updates but will not install them. You will find these update files in /Library/Updates/ folder on your Mac.
Install downloaded macOS updates
Updates you download cannot be manually installed using Terminal commands. These updates can only be installed with a command in the Terminal application.
To install them, you need to first find out the name of the update and then use that name below to install the update on your Mac.
It will let you know when the update is installed on your machine. The process shouldn’t take too long as the update has already been downloaded on your Mac and just needs to be installed.
Download and install all macOS updates
What you did in the above sections was update everything bit by bit. What if you want to find, download, and install all of your macOS updates in one go? Well, Terminal has helped you.
There is a command that allows you to install all available updates on your Mac in a single execution.
- Open End application and run the following command in it.
software update -i -a
The command will install all updates and let you know when it’s done. This process will 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 applications not developed by Apple require various commands to be updated from Terminal on your Mac. These app updates will not show up when you run the commands mentioned above.
To be able to update all your Mac Store Apps, you will need to install Homebrew followed by ‘mas’ on your machine. It will then allow you to update your other apps.
Open End and run the following command to install Homebrew.
/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
Once Homebrew is installed, enter the following command and press enter to install the mas utility.
mas installation phase
Once mas is installed, you can run the following command to see a list of all the applications that can be updated using this utility.
list of mas
Enter the following command and press enter to see all apps that require an update.
mas is outdated
Run the following command to update all outdated applications. It will first download updates for all outdated apps and then install them, so expect a short period of time before it completes.
Wait while the extension updates your app. When done, you can close the Terminal window.
You don’t necessarily need to install mas and Homebrew on your Mac if you don’t plan to update your apps this way in the future. Uninstalling them won’t affect updated apps on your Mac, so it’s probably safe to remove them if you want.