Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
    
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 at 20:50
    
@bmike I mean upgrade. – bsamek Jan 20 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 at 13:40
    
Yes, that's what I mean. – bsamek Jan 21 at 13:55
up vote 4 down vote accepted

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.

share|improve this answer

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.
share|improve this answer
    
Not from that command no, but maybe there's another way to do it. – bsamek Jan 20 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 at 21:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.