How to Run WSUS Server Cleanup Wizard to Clean Updates

In this post I will show you how to use WSUS server cleanup wizard to clean updates in your WSUS setup. With WSUS server cleanup wizard you can cleanup or remove unnecessary updates from the WSUS server.

WSUS is a Windows Server feature to manage and deploy updates to computers. When you start to deploy updates to all computers using WSUS, initially it’s all good. However as months pass by, you may notice the drive consuming too much space on the WSUS server and sometimes drive becomes full.

You may think of increasing the disk space but how long are you do this same thing. Another workaround would be to use some scripts that does the WSUS cleanup. Well the solution to this problem is using the WSUS server cleanup wizard to clean your old, expired and superseded updates.

There are different ways to deploy and manage software updates and most organizations either use Standalone WSUS or Configuration Manager. Organizations that haven’t got Configuration Manager installed rely on WSUS to deploy updates. If you ask me which one is the best option among WSUS and Configuration Manager, I would say Configuration Manager.

Configuration Manager requires WSUS and they both work together very well. Windows Server Update Services (WSUS) Configuration Manager connects to the WSUS server once every hour and configures the WSUS server with the settings that are defined for the software update point in the Configuration Manager console.

In my recent post, I showed how to enable WSUS cleanup in ConfigMgr. The WSUS maintenance options are integrated in Configuration Manager and you don’t need to worry about cleaning the updates. However if you are using only WSUS to manage and deploy updates, use WSUS Server cleanup wizard.

WSUS Server Cleanup Wizard Features

When you run the WSUS server cleanup wizard, it performs the following things.

  • Remove unused updates and update revisions (stale and old updates and unapproved update revisions).
  • Delete client computers that have not contacted the server since thirty days or more.
  • Delete update files that aren’t required anymore.
  • Decline expired updates and superseded updates which are not required anymore.

Run WSUS Server Cleanup Wizard

Perform the below steps to run Server Cleanup Wizard in WSUS Console.

  • Launch the WSUS administration console on your Windows Server.
  • Select Options, and then click Server Cleanup Wizard.
Using WSUS Server Cleanup Wizard
Using WSUS Server Cleanup Wizard

This launches the WSUS Server Cleanup Wizard. On the Select Items to Clean window, select the update options for cleanup. The available cleanup options include.

  • Unused updates and Update revisions – Removes all older updates and update revisions that have not been approved.
  • Computers not contacting the server – Deletes all client computers that have not contacted the server in thirty days or more.
  • Unneeded update files – Deletes all update files that are not needed by updates or by downstream servers.
  • Expired Updates – The wizard will decline all updates that have been expired by Microsoft.
  • Superseded updates – The wizard will decline all updates that meet all the following criteria :-
    • The superseded update is not mandatory
    • The superseded update has been on the server for thirty days or more
    • The superseded update is not currently reported as needed by any client
    • The superseded update has not been explicitly deployed to a computer group for ninety days or more
    • The superseding update must be approved for install to a computer group

I recommend selecting all the options for the cleanup and let WSUS server run the cleanup. Click Next.

Using WSUS Server Cleanup Wizard to Clean Updates
Using WSUS Server Cleanup Wizard to Clean Updates

It make take significant amount of time for the WSUS server cleanup to complete. Do not make any changes while the cleanup is running.

Using WSUS Server Cleanup Wizard to Clean Updates
Using WSUS Server Cleanup Wizard to Clean Updates

The WSUS Server cleanup wizard has finished cleaning up the server. You can see the number of updates that were cleaned or deleted. Since I am running the cleanup wizard in my lab, I don’t any expired or superseded updates. But running the same WSUS server cleanup in a larger setup will definitely save disk space by removing expired and superseded updates.

Click Finish to close the WSUS Server Cleanup wizard.

Using WSUS Server Cleanup Wizard to Clean Updates
Using WSUS Server Cleanup Wizard to Clean Updates

5 Comments

  1. Avatar photo Vishal Makhija says:

    Hello,

    My machine is downloading unapproved updates, even though dual scan is disabled

  2. Avatar photo Valentfao says:

    every time i run the cleaning wizard it never finishes, always error. what should I do?

      1. Avatar photo Valentfao says:

        WSUS Console Error database
        The WSUS administration console was unable to connect to the WSUS Server Database.

        Verify that SQL server is running on the WSUS Server. If the problem persists, try restarting SQL.

        System.Data.SqlClient.SqlException — Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
        The statement has been terminated.

        Source
        .Net SqlClient Data Provider

        Stack Trace:
        at Microsoft.UpdateServices.Internal.BaseApi.SoapExceptionProcessor.DeserializeAndThrow(SoapException soapException)
        at Microsoft.UpdateServices.Internal.DatabaseAccess.AdminDataAccessProxy.ExecuteSPSearchUpdates(String updateScopeXml, String preferredCulture, ExtendedPublicationState publicationState)
        at Microsoft.UpdateServices.Internal.BaseApi.Update.SearchUpdates(UpdateScope searchScope, ExtendedPublicationState publicationState, UpdateServer updateServer)
        at Microsoft.UpdateServices.UI.AdminApiAccess.UpdateManager.GetUpdates(ExtendedUpdateScope filter)
        at Microsoft.UpdateServices.UI.AdminApiAccess.WsusSynchronizationInfo.InitializeDerivedProperties()
        at Microsoft.UpdateServices.UI.SnapIn.Pages.SyncResultsListPage.GetSyncInfoRow(WsusSynchronizationInfo syncInfo)
        at Microsoft.UpdateServices.UI.SnapIn.Pages.SyncResultsListPage.GetListRows()

  3. Avatar photo Sean Templeton says:

    I use Configuration Manager with WSUS and have the cleanup configured exactly as you have recommended. I still have about 570GB on my WSUS server (in the SMS & WSUS folders) that’s throwing disk space warnings. Config Manager and WSUS are installed on different servers. Is it OK to also run the WSUS cleanup wizard?

Leave a Reply

Your email address will not be published. Required fields are marked *