4

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

  • What is your definition of upgrade? Updates come through software update, upgrades do not, but perhaps you aren't using the Apple definitions? – bmike Jan 20 '16 at 20:50
  • @bmike I mean upgrade. – bsamek Jan 20 '16 at 20:55
  • So you mean, for example, going from 10.10 to 10.11 not 10.11.0 to 10.11.1? – TJ Luoma Jan 21 '16 at 13:40
  • Yes, that's what I mean. – bsamek Jan 21 '16 at 13:55
4

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.

4

Wouldn't appear to be, looking at the man page; unless it appears in the --list arg

https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man8/softwareupdate.8.html

     --l | --list
                 List all available updates.

     -i | --install
                 Each update specified by args is downloaded and installed.  args can be one of the follow-ing: following:
                 ing:

                 -r | --recommended
                             All updates that are recommended for your system. These are prefixed with a *
                             character in the --list output.

                 -a | --all  All updates that are applicable to your system, including those non-recommended
                             ones, which are prefixed with a - character in the --list output. (Non-recom-mended (Non-recommended
                             mended updates are uncommon in any case.)

                 item ...    One or more specified updates. The --list output shows the item names you can
                             specify here, prefixed by the * or - characters.
  • Not from that command no, but maybe there's another way to do it. – bsamek Jan 20 '16 at 20:01
  • Tetsujin is correct. I'll add a second "no" answer with some options if you are automating upgrades across many machines. The effort to do so makes it not feasible for most. Running the installer app is normally the best option in cases where you are upgrading less than 25 Macs or so... – bmike Jan 20 '16 at 21:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .