Aug 13, 2015 - cleanup script updated to fix reported issues
In System Center 2012 Configuration Manager, we’ve added the capability to automatically remove software update content from distribution points when that content is related to expired updates. This process helps manage drive space on your distribution points by removing any content you no longer need. It’s particularly helpful for Endpoint Protection definition updates, given their frequency of release, deployment, and expiration. In this blog, I’m going to walk you through exactly how the process works, and I’m also going to provide a script you can use to clean up source locations related to obsolete updates, as our out-of-box process does not manage source content.
The first part of the process for managing content related to expired updates is getting expired updates out of any deployed update groups. First, we never delete any expired update associated with an active deployment, as we don’t want to remove anything associated with your deployments. It could be disconcerting if updates simply disappeared from your deployments and you had no idea why, so we just don’t do it. The step to make expired updates removable, however, is straightforward, and it should be part of a monthly process. To remove expired updates from all deployments in only a couple of clicks, do the following. Note: When using Auto Deployment Rules to deliver definition updates, where you should be re-using the same update group each time the rule runs, expired updates are automatically removed from the update group each time the rule runs.
Next, there are four phases to removing expired updates and its related content, and those are: the expiration action, tomb-stoning, deletion, and then source cleanup, which is a scripted action. At a high level, updates that have been expired and that aren’t part of an active deployment will be deleted 7 days after they are expired. There is no specific or configurable maintenance task to do this—it’s an automated process that crosses multiple ConfigMgr components. Let’s walk through the process at a detailed level so you understand how it works.
Removed 106 unreferenced updates SMS_WSUS_SYNC_MANAGER 3/30/2012 12:06:15 AM
Deleting old expired updates... SMS_WSUS_SYNC_MANAGER 3/30/2012 12:06:16 AM
Deleted 80 expired updates SMS_WSUS_SYNC_MANAGER 3/30/2012 12:06:20 AM
Deleted 80 expired updates total SMS_WSUS_SYNC_MANAGER 3/30/2012 12:06:20 AM
Found notification file C:Program FilesMicrosoft Configuration Managerinboxesobjmgr.box16824032.CIN SMS_OBJECT_REPLICATION_MANAGER 3/30/2012 12:06:11 AM
Completed processing CIN notification files SMS_OBJECT_REPLICATION_MANAGER 3/30/2012 12:07:31 AM
Successfully deleted SoftwareUpdate 3da7abb4-d643-422c-9e6d-a5f838fb71a1 SMS_OBJECT_REPLICATION_MANAGER 3/30/2012 12:07:32 AM
Expired update and associated content cleanup in Configuration Manager 2012 is a built-in mechanism to help keep your console, database, distribution points and (with the script) source directories as clean as possible. Hopefully, you better understand the manual steps required to do this, as well as how all of the automated pieces work together to manage expired updates and content.
And now a word from our lawyers: the attached content is not for production use; it is a sample for evaluation only and thus subject to the Microsoft Limited Public License (see Exhibit B of the TechNet Terms of Use ). This posting is provided "AS IS" with no warranties and confers no rights.