Wednesday 23 September 2015

How to reset Software Update Server on Mac OS 10.10 Yosemite / 10.11 El Capitan

This article briefly details how to reset a misbehaving Software Update Server on Mac OS 10.10 Yosemite or 10.11 El Capitan.  It was tested on server version 5.0.4 but should work on 4.x too.



This can (and for simplicity, probably should) all be done from Terminal.app / command line without touching Server.app GUI.

Firstly, stop the Software Update Service if it's running: -

sudo serveradmin stop swupdate

Next, move the old config files out of the way (but keep them just in case for now).

sudo mv /Library/Server/Software\ Update/Cache  /Library/Server/Software\ Update/Cache.old  
(the server should automatically create a new folder after a few moments)
sudo mv /Library/Server/Software\ Update/Config/swupd.conf /Library/Server/Software\ Update/Config/swupd.conf.old
sudo mv /Library/Server/Software\ Update/Config/swupd.plist /Library/Server/Software\ Update/Config/swupd.plist.old

... and wipe the old logs and cache...

sudo rm /Library/Server/Software\ Update/Log/*
sudo rm /Library/Server/Software\ Update/Cache/*

... and the old data directory where the downloaded updates are stored...

sudo rm /Library/Server/Software\ Update/Data/*

Next, we need to set a couple of things....  Firstly, we need to tell it the port to use to serve updates (strangely it doesn't populate the default port for itself).

sudo serveradmin settings swupdate:portToUse = 8088

If you use a custom Data directory for your updates (eg. you put them on a different volume), then make the directory, give ownership to softwareupdate and update the config to point at it...

sudo mkdir /Volumes/myDisk/swupdate
sudo chown -R _softwareupdate:_softwareupdate /Volumes/myDisk/swupdate
sudo serveradmin settings swupdate:updatesDocRoot = "/Volumes/myDisk/swupdate/"

One more thing, depending on the URL you use in your MDM to point clients to the server, you may need to create a soft link in the Data html folder to point clients to the software update catalog file (revise this as necessary if you moved your data folder someplace else): -

sudo ln -s /Library/Server/Software\ Update/Data/html/index-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog /Library/Server/Software\ Update/Data/html/index.sucatalog

Ok!  Now fire it back up...

sudo serveradmin start swupdate

Go make a coffee, take a walk or do something fun for awhile while it downloads the new catalogues...


After awhile, you should have a clean Software Update Server ready to start work, enjoy :)





1 comment:

  1. There's a typo above. The folder is actually /Library/Server/Software\ Update/Log (not Logs as you have it).

    ReplyDelete