How to apply OS X software updates from the command line. In addition to the Mac App Store, you can use the Terminal to access and install available software updates.
If, however, you find that you're unable to download using Software Update (with an error 'Update not found' or 'The requested version of macOS is not available'), you can always download your desired version directly from the command line (Terminal.app) by running the softwareupdate command. There are a number of documented arguments (accessible using --help), however, you can run one of the following commands to specifically download the full installer:
which will download the full installer for your currently installed version, or
Mac users with macOS Mojave and macOS Catalina, and new operating systems in place can now install Command Line Tools from the Xcode IDE without needing to install the entire Xcode package, or opening an Apple developers account. Then I saw Command Line Tools update in the App Store, so I cancelled the one initiated by Homebrew and initiated installation from the App Store. Now, in App Store, it keeps on showing update Command Line Tools for OS X El Capitan and macOS High Sierra.
softwareupdate --fetch-full-installer --full-installer-version <
e.g. if you want to download macOS Mojave, you would run:
softwareupdate --fetch-full-installer --full-installer-version 10.13.6
Once you have the full installer, you can use it for many purposes including:
Mac Software Update Command Line Tools
- Installing macOS on externally connected media (e.g. a Thunderbolt-connected MacBook); or
- Creating a USB macOS installer.