Software Update Downloader

There are at least a few folks who are less than happy with Apple’s decision to remove the option to download and keep updates from the Software Update application in Snow Leopard. I count myself among them.

Though the option may be gone from the GUI, however, it still exists in the command line version. Rob Griffiths solution is to use the command:

softwareupdate -d

There are a couple problems with this. The first is that the command, as listed in Mr. Griffiths article, doesn’t do anything, at least not when I run it. From what I can tell the command requires the -a flag. So if you want it to actually work, it should look like:

softwareupdate -d -a

This will download everything you don’t already have to a directory that the Software Update app can see (/Library/Updates). Now we’re off to a more promising start.

The other problem with this method is that it doesn’t offer a great deal of things you normally get with the GUI. In particular, as Pierre Igot points out, you don’t get a progress indicator. Which really blows, I agree.

You also don’t get prompted to install the updates once downloading has finished. To that end, I’ve written a little Automator Service. The service, when launched from any Services menu in any app, will prompt you to continue with this confirmation box:

Once you click OK, the download will begin. When the download is complete, the service will copy the new updates to an Updates folder at the top level your home account (~/Updates) for safe keeping.

Once copying has finished, the Software Update app will launch and ask you if you want to install the updates you just downloaded. Just install as normal. Let Software Update do its business.

In the end everything will get installed and you’ll be left with copies of all the updates in your home account for later use, all with only a single download.

While I can’t really offer a progress bar, I like this better than the alternatives. It more closely approximates the old “Install and Keep” Software Update method than having to go and open the Terminal and do all that stuff as individual steps. And it’s almost as user-friendly, being activated from a drop-down menu, just like Software Update usually is.

So here it is. The Software Update Download service:
Software Update Download Service

Download it, unstuff it and put it in ~/Library/Services. You should be able to launch it from the Services menu in any application.

A minor disclaimer: this service has mostly worked well for me, but there was one instance in which it seems to have had troubles. In particular, it seemed to choke on the latest iWork ’09 updates. This may have been a fluke, or it may have had something to do with that particular update. I honestly don’t know. But if you have troubles, let me know in the comments of this article. I’ll do my best to figure out what’s wrong as I’m using this in my own workflow. But consider this a beta at best; it’s been through minimal testing.

Also, you should be able to open the workflow up in Automator and make adjustments to the behavior if you so please. Feel free to do so and let me know about it in the comments.

Enjoy!

17 Comments

  1. Patrick Fergus
    Posted December 2, 2009 at 12:22 PM | Permalink

    systemsboy,

    Found my way back to this post through your MacOSXHints article:

    http://www.macosxhints.com/article.php?story=20091120094255493

    Outside of having a fleet of identically configured machines, can you explain why keeping potentially machine-specific delta updates is a good idea? You (coming from the system administration world) certainly could keep machine-specific vs. general updates straight, but for the outside world wouldn’t collecting machine-specific updates be potentially dangerous? The general public would expect a machine-specific update of 10.6.98 to be able to be applied to all of their machines and it potentially might not work.

    Mac OS X: Software update sizes can vary
    http://support.apple.com/kb/HT1228

    - Patrick

  2. Posted December 2, 2009 at 12:48 PM | Permalink

    Having multiple identically configured machines is certainly one good reason to keep machine-specific updates, and is a boat some people — particularly sysadmins to which this blog is mainly directed — find themselves in.

    Also, not all (in fact, many) updates downloaded via Software Update are not machine-specific, so downloading them is useful if you need to update other systems, even differently configured systems.

    As linked to in the article, Pierre Igot also lists numerous other reasons why this functionality would be useful to someone in his situation:
    http://www.betalogue.com/2009/10/22/software-update/

    There should be no danger of mistakenly installing a machine-specific update on the wrong hardware as the Installer application will check for the proper config. If the hardware doesn’t match the Installer version, the Installer won’t run.

    The “Install and Keep” option that used to be provided by the Software Update app was probably never intended for the general public, and that’s probably why it was removed in Snow Leopard. But for those of us with more advanced proclivities, this Service brings back at least some of the old functionality.

    -systemsboy

  3. Ja'far
    Posted December 2, 2009 at 6:12 PM | Permalink

    Hi — I have installed the script and run it from services. The files are in ~/Update. Fine. But when I go to install the downloaded files using Software Update the files start to download again. What’s going on?

  4. Posted December 2, 2009 at 6:45 PM | Permalink

    Hmmm… No, that’s certainly not what’s supposed to happen.

    Can you tell me if you’re logged in and running the Service as an admin user? If not it could be causing problems.

    Also, this only works properly in Snow Leopard (Mac OS X 10.6x). If you’re running an older OS version you could have a problem like this.

    I hope this helps you narrow it down. Let me know what you find.

    -systemsboy

  5. John Carroll
    Posted December 3, 2009 at 1:17 AM | Permalink

    The link (http://systemsboy.com/2009/wp-content/uploads/2009/11/SoftwareUpdateDownloadService.zip) to the Software Update Download Service zipped file does not seem to work.

  6. Chris
    Posted December 3, 2009 at 7:21 AM | Permalink

    I’ve been equally dismayed by Apple’s removal of “download and keep”. I have 5 bootable volumes on two similar iMacs to keep up to date. Now, I won’t dread the next software update opportunity. Thank you.

    Just one question about usage when a Software Update message pops up:
    Do I start the new SUD service while the SU dialog box is still open, or do I close SU first by clicking on {Not Now] and then start the SUD service steps?

  7. Posted December 3, 2009 at 9:21 AM | Permalink

    John Carroll,

    Thank you very much for alerting me to the error. Not sure how that happened. I have corrected it.

    -systemsboy

  8. Posted December 3, 2009 at 9:28 AM | Permalink

    Chris,

    To be completely honest, I’m not sure what will happen if you leave Software Update open. I’d be curious to find out.

    If you want to be safe, though, I would close the Software Update app, then run the service, which will reopen Software Update when it’s done. Otherwise you run the risk of Software Update not realizing that downloads have been completed.

    If you happen to try it with SU open, let me know what happens.

    -systemsboy

  9. Luca Nalin
    Posted December 4, 2009 at 8:02 AM | Permalink

    You can see progress information by adding the “-v” argument:
    softwareupdate -d -a -v

  10. Posted December 4, 2009 at 6:39 PM | Permalink

    Yes, unfortunately this only works in the command line, and doesn’t show in any graphical way. So, when used within the service, the -v flag is pretty useless. I wish there were some graphical way to get progress, but I’m not seeing one offhand.

    -systemsboy

  11. Posted January 12, 2010 at 1:26 PM | Permalink

    I’m using 10.6.2 on a new iMac 21 1/2″.

    I found that typing the following in the Terminal Application worked fine for me: softwareupdate -d -a.
    Although there wasn’t a progress bar, it showed a list of what was downloaded and indicated in words to me when it was finished.

    My question: When I check the Updates folder, for some of the updates, I see more than one package. For example, an Epson printer drivers update included 10 different packages. Would I need to open and install each of those packages? Is this because each update is particular to each computer according to what it needs, and I’m getting necessary pieces? I notice, for example, that Software update on my computer will indicate that I need current HP Printer Drivers, and the update is supposedly about 50 megs. However, when I go to Apple’s website, the HP Printer Driver update is well several hundred megs.

  12. Posted January 13, 2010 at 9:20 AM | Permalink

    Yes, certain updates use a number of packages. In the case of the HP printer driver update, I believe each package represents a different printer model. Along with each set of packages there is also a .dist file. You should be able to use this to install the entire (or the appropriate) set of packages to your system. I say “should” because I’ve had mixed results with these. But try it first. The .dist file is used by Software Update to handle multi-package installs. If for some reason it fails when you run it by hand you can always install each package individually.

    -systemsboy

  13. Posted January 13, 2010 at 10:59 AM | Permalink

    Thanks for your input.
    I wondered if there might be a way to run just one package.
    As you alluded to, I found that the .dist file didn’t do anything except produce a message in the installation window saying “The installation failed. The Installer could not install the software. The Installer could not install the software because there was no software found to install.” Too bad, because the other packages are sitting right under its nose in the same folder!

    So I have one other question, if you wouldn’t mind taking the time:

    Given the slew of packages to install, do you know if it matters what order I install them? I suspect that it doesn’t matter, based on what I tried.
    I also see that one of the packages is called “MakeQueuesScript.pkg”. I’m wondering if I should do that one first? I did install it first and noticed that after being asked for my Admin password, I didn’t have to enter my password for the other remaining packages. But I don’t know if there was a causal relationship there or not. Any additional info you would be willing to share would be appreciated. Thanks.

  14. Posted January 13, 2010 at 11:12 AM | Permalink

    My guess here is that the majority of those packages are simply drivers for various printers, and that their installation order is unimportant. However, I would also guess that the MakeQueuesScripts.pkg does some printer setup once the updates have occurred. I would probably run it last. If you wanted to be safe, you could run it before and after the driver update packages.
    These are, of course, only educated guesses.

    To be honest, I’ve come across Software Update bundles in the past — particularly ones for the Final Cut Suite — that can’t be installed by hand, and that must be installed via the Software Update mechanism. The telltale sign in these cases is that the Installer app simply refuses to install them. This was true even using 10.5′s “Install and Keep” functionality (which is what I’m trying to mimic here), and will likely be true with some 10.6 updates as well. The bottom line is that there are some things that will need to be installed the old fashioned way using Software Update. So if you’re unsure, or having troubles, just do that. It’s always the safe bet.

    Cheers!

    -systemsboy

  15. Posted January 13, 2010 at 11:32 PM | Permalink

    Thanks for the putting together the script, for your help and for the realism in this situation. It’s always good to be open to the state of “not knowing” and awe in the face of the mystery of it all.

    Cheers!

  16. Rodrigo G
    Posted September 19, 2010 at 2:30 PM | Permalink

    (sorry for my english, i’m from Argentina)

    for bundles (like FinalCut) make a /Contents/Packages/ directory and put the files there, leaving the .dist
    or during the installation, check the log, it will show the path required for the files

  17. Posted September 19, 2010 at 3:26 PM | Permalink

    Huh. Very cool tip, but I’m having trouble getting it to work. I’ve created /Contents/Packages at the same level as the .dist, but it still doesn’t see the packages (i.e., Show Files does not generate a file listing) and installation still fails. I’ve checked the log, but it doesn’t tell me where it’s looking, or, rather, it seems to be trying to look within the .dist.

    In fact, I can’t get any of these .dist files to work, which is the crux of the problem. If you could supply a bit more information on how you got this to work, that’d be great, because it sounds very useful.

    Thanks.

    -systemsboy

Post a Comment

Your email is never shared. Required fields are marked *

*
*