David Williams Technical


Endpoint Management & Deployment – MDM Management – Scripting – Cyber Security Engineering – Application Configuration & Deployment

Install Mac Applications without launching the App Store

Note: This was tested for all operating systems up to Monterey.

Before installing Homebrew you need to install Xcode development environment. You can install this straight from the Terminal window:


Launch your Mac’s Terminal (‘Applications > Utilities > Terminal.’)

Type the following command into the Terminal window:

xcode-select –-install

Press the ‘Enter’ key on your keyboard.

When to install Homebrew by inserting this command into terminal window:

/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)”

This will start the installation process. Let it complete before typing any other commands.


Updating Applications from the Terminal

Once you have Homebrew setup, you’re ready to install mas:

Launch your Mac’s Terminal (‘Applications > Utilities > Terminal.’)

Copy/paste the following command into the Terminal window:

brew install mas

Press the ‘Enter’ key on your keyboard.

Homebrew will now install mas. Once mas is set up on your machine, you’re ready to start updating your apps from the command line.

To see a list of all the apps that need updating, run the following command in the Terminal window:

mas outdated

This will present you with a list of all the apps that need updating. To update everything on this list, type the following command into the Terminal window:

mas upgrade


Update a specific app

To get picky about which applications receive an update:

Run the ‘mas outdated’ command, as normal.

Check the Terminal output for the application that you want to update – it should have a number in front of it. Copy this number.

Type the following command into the Terminal, but don’t press the ‘Enter’ key just yet:

mas upgrade

Paste the number to the end of this command.

Now press the ‘Enter’ key on your Mac’s keyboard.


Install macOS updates from the Terminal

There’s only one thing more annoying than having to update applications via the App Store – and that’s having to update macOS via the App Store!

However, you can install system-level updates directly from the Terminal, without having to install any additional software. Even if you decided against installing Homebrew and mas, it’s still possible to update macOS without ever venturing into the App Store.


Install all available system updates

To check for available system updates:

Open a new Terminal window (‘Applications > Utilities > Finder.’)

Copy/paste the following command into the Terminal:

softwareupdate -l

After a few moments, the Terminal will return a list of all the available system updates.

To install everything on this list, run the following command:

softwareupdate -i -a

Restart your computer when prompted, and once your Mac boots up your operating system will be completely up to date.


Get selective with system updates

Alternatively, if you want to pick and choose which updates to install, then:

Find out what updates are available, by running the ‘softwareupdate -l’ command.

Check the Terminal output. Each update should have a * symbol, followed by the name of the update, for example here’s the Terminal report for an available iTunes 

Update:

* iTunesX-%Verion%

iTunes (%Verion%), 272816K [recommended]

Type the following command, but don’t press the ‘Enter’ key:

softwareupdate -i

Paste the name of the update to the end of this command, for example:

softwareupdate -i iTunesX-%Verion%

Press the ‘Enter’ key, and the update will be installed.


Download without installing

Often, the most frustrating part of installing system-level updates, is that you need to step away from your Mac while the installation is actually taking place, which isn’t always possible in the middle of the working day!

If you update via the Terminal, then you can download all the available updates without installing them, using the following command:

softwareupdate -d -a

You can then install these updates at a later date, via the App Store. Although you will need to launch the App Store, this approach allows you to download all available system-level updates in the background, and then set them to install later.