locked
Clearing obsolete updates in SCCM 1902 RRS feed

  • Question

  • All,

    We have run exec 'spGetObsoleteUpdatesToCleanup' to output the number of obsolete updates in SQL for SCCM.  I would have expected the SUP sync job to purge expired/superseded updates in the database. 

    The WSUS content directory is also 400 Gb, so we need to remediate the issue quickly. 

    The WSUS clean up wizard times out.

    Reading through this:

    https://support.microsoft.com/en-us/help/4490644/complete-guide-to-microsoft-wsus-and-configuration-manager-sup-maint

    I am considering creating the index and indexing the database, then running the stored procedure that only removes unused updates and update revisions in Step 6.

    Would that be a good course of action? Would it purge the WSUS database and content directory?



    Ash422


    • Edited by Ash422 Friday, August 7, 2020 4:58 PM comment
    Friday, August 7, 2020 4:58 PM

All replies

  • First, what version of ConfigMgr are you running?

    The WSUS content directory is also 400 Gb, so we need to remediate the issue quickly. 

    This means you are approving updates in WSUS. Stop doing that. ConfigMgr does not use or require updates to be approved. Approving updates in WSUS causes them to be downloaded by WSUS also which is also unused and irrelevant to ConfigMgr (unless you are in a completely offline scenario). 

    As for the WSUS cleanup wizard, you need to keep running it manually until it finishes successfully. Alternatively, you can search the web for scripts that initiate the same process which isn't subject to the timeout. As noted though, first change your updates in WSUS to "Not Approved" otherwise the cleanup wizard won't clean them up to my knowledge.


    Jason | https://home.configmgrftw.com | @jasonsandys

    Friday, August 7, 2020 5:41 PM
  • That's great advice. Thank you. 

    The SCCM Version is 1902.

    'Run WSUS Cleanup Wizard' is selected under Supersedence Rules (SUP).

    I will set all updates to Unapproved:

    In the WSUS administrative console, click Updates, and then click All Updates.
    In the list of updates, select one or more approved updates that you want to change to Not Approved.
    In the shortcut menu or the Actions pane, select Not Approved, and then click Yes on the confirmation message.

    Then run Decline-SupersededUpdatesWithExclusionPeriod.ps1 using https://support.microsoft.com/en-us/help/4490644/complete-guide-to-microsoft-wsus-and-configuration-manager-sup-maint guide.


    Ash422

    Friday, August 7, 2020 11:59 PM
  • Hi,

    After set all updates to unapproved and run Decline-SupersededUpdatesWithExclusionPeriod.ps1 script, did you clear the WSUS content directory successfully?

    By the way, SCCM 1902 will end support on September 27, 2020, it's recommend to upgrade to SCCM 2002 version ASAP.

    This "System Center" Forum will be migrating to a new home on Microsoft Q&A, please refer to this sticky post for more details.

    Regards,
    Allen

    "MECM" forum will be migrating to a new home on Microsoft Q&A!
    We invite you to post new questions in the "MECM" forum's new home on Microsoft Q&A!
    For more information, please refer to the sticky post.

    Monday, August 10, 2020 2:35 AM
  • Yes, The WSUS Content Directory has been cleared.

    The WSUS Cleanup wizard is running now without timing out, so hopefully this will clear the wsus database.


    Ash422

    Monday, August 10, 2020 11:41 PM