16
- April
2017
Posted By : Zeng Yinghua (Sandy)
Manually cleanup Admin Console unwanted Software Updates

4 days holidays, and feeling a bit boring. So I decided to sync Software Update, and choose product “FeatureOnDemand”, I wanted to see what kind of updates will show up.
And WHAT?! 618 LanguageFeatureOnDemand  – Windows 10 Insider preview xxxx blabla updates?!
This is way too much, not mention that this is a test lab, and I am running out of RAM, and it crashed my server totally, I barely can open Admin Console UI.

Since those are not expired updates, so automatic clean up won’t do anything of it. Unchecked those product won’t help too, well it won’t do re-sync, but they are there forever? ignoring..right?   A friend of my tested this again, said if uncheck a product, it should mark those updates as expired, and clean up schedule is by default.

So, I am going to do a bit cleanup by myself, it is NOT supported, so use on your own risk.

The WSUS Synchronization Manager component removes expired updates. It does this only if the following conditions are true:

  • The update is not referenced in an update assignment.
  • The update is older than the value of “Updates Cleanup Age.” (By default, this value is seven days.)

A proper way to do cleanup, you should clean up your WSUS database. How ever, this post is not about clean up WSUS.
Read more from:

https://support.microsoft.com/en-my/help/3090526/software-update-maintenance-in-system-center-2012-configuration-manage

https://deploymentresearch.com/Research/Post/665/Fixing-WSUS-When-the-Best-Defense-is-a-Good-Offense

Fireup SQL management studio.

Run this: (the xxx means your site database)

SELECT *
  FROM [CM_xxx].[dbo].[CI_ConfigurationItems]
  where [CIType_ID] = '8' and CAST(SDMPackageDigest AS nvarchar(max)) LIKE N'%languagefeatureondemand%' and IsLatest = '1' and IsHidden = '0'

In my case, I see exactly row numbers as in my Admin console UI

If they are not same, then your SQL query is wrong, don’t continue.

Next start cleanup. Run this: (the xxx means your site database)

DELETE FROM [CM_xxx].[dbo].[CI_ConfigurationItems]
WHERE [CIType_ID] = '8' and CAST(SDMPackageDigest AS nvarchar(max)) LIKE N'%languagefeatureondemand%' and IsLatest = '1' and IsHidden = '0'

In my case:

Go back to Admin console, refresh.

After clean up all those updates that I don’t want, I got back only those 68 updates that I actually want.

Comments

  • Was there ever any fallout resulting from this manual method?

    • Zeng Yinghua (Sandy)

      February 28, 2018 at 23:30

      Hi Mike, I have never done this in production, only tested in my own test lab, it is more like just extra information sharing only, and not supported by Microsoft. I updated my post a bit, a proper way to do this is following Microsoft document https://support.microsoft.com/en-my/help/3090526/software-update-maintenance-in-system-center-2012-configuration-manage. When I wrote this post, I had very bad host hyper-V machine for my test lab, didn’t have enough memory for my test ConfigMgr server, I couldn’t add any more memory and cannot open my admin console, that’s why I had to use this unsupported SQL query to clean those software updates what is in ConfigMgr database. So I wouldn’t recommend use this in production. In a healthy environment, it should clean up automatically.

  • Alternatively, you can decline those updates in the WSUS Administration console and they will be removed from ConfigMgr when next scheduled synchronisation occurs.

    • Zeng Yinghua (Sandy)

      September 18, 2018 at 19:05

      Agreed! I as actually thinking delete this post, I wrote this long time ago, and by now I think that is not even the correct way to clean up. Please confirm you have receive this message, then I will delete this post. 🙂

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.