You can upgrade software with sudo softwareupdate --install --all
. Is it possible to upgrade the OS itself from the command line?
macOS Command Line Upgrade – How to Upgrade OS X Operating System
automationcommand linemacosupgrade
Related Question
- Command Line Tools – Complete Install Guide for MacOS Xcode
- MacOS – Trying to install Command Line Tools without Xcode
- Atom Editor Not Opening from Command Line – Fix Guide
- Beta Command Line Tools – How to Install Using Softwareupdate on 10.14.5
- Command Line – Brew Cask Install Emacs Takes Control of Emacs Command
- MacOS – How Do I Upgrade VirtualBox from the Command Line
- Softwareupdate shows 2 updates for Command Line Tools – get rid of one entry
- Unable to Install Update via Softwareupdate Command Line Tool – Fix
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.