macOS Command Line Upgrade – How to Upgrade OS X Operating System

automationcommand linemacosupgrade

You can upgrade software with sudo softwareupdate --install --all. Is it possible to upgrade the OS itself from the command line?

Best Answer

Since the OS X installer is an app, you would need a scripting framework to automate clicking of the buttons. Far easier to set up a MDM solution where the installer is turned into a netboot resource than to hack apart the UI and script the installation.

For starters, look at the AutoDMG or Imagr/NBICreator.

You can integrate these with most MDM like Casper/Munki or roll an imaging solution like DeployStudio - but all of these require external computers to manage/supply the computer being updated. There isn't a simple extension to the Apple provided softwareupdate tool since it is designed to patch an OS and apps and not run the upgrade/migration on itself. Even the best surgeon in town gets someone else to operate on their knee when they go under the knife.