What to do when your WSUSContent folder grows too large

Occasionally administrators run into an issue with WSUS where their WSUSContent folder gets too large and they are at risk of running out of disk space. The only supported way to resolve these disk space issues is to use the wsusutil.exe RESET command. (see below)

I want to provide some background of how this problem may occur so the root cause can be identified. Just running the RESET process without determining how you got there may put you back where you started.

1) Do you have any WSUS downstream servers configured to download from your WSUS server? You can find out by opening up the WSUS Administrative console, and in the left pane select Downstream Servers. If there are downstream servers listed, the problem could possibly be caused by a setting in their configuration as well.

2) Update Files and Languages – Update Languages tab: You should only download updates in languages which you support. If your WSUS server has been in place for a while and all along you had All Languages defined under the Update Languages tab, and you recently changed it back to English for example, the updates which have been downloaded in other languages do not automatically get deleted or cleaned up.

Important note: If you have a downstream server configured, and All Languages is configured on the downstream server, then it will force your upstream WSUS server to download those languages regardless of the settings defined in the console.  

3) Update Files and Languages – Update Files tab: If you have “Store update files locally on this server” set, there are a couple options to be aware of.

· Download update files to this server only when updates are approved: If this is not checked then ALL updates which are synchronized are downloaded to the WSUS server. To minimize disk space requirements, this option should be checked. Note: Only use this option when you intend to approve all products and classifications that you have configured under Options – Products and Classifications.

· Download express installation files: If this is checked, then the disk space requirements for updates increase 3 to 4x the normal amount. Only use this setting if your clients are poorly connected to the WSUS server such as over a slow LAN connection or the Internet. Using express installation files requires a higher disk space investment on the server, but significantly reduces the traffic between the WSUS server and the clients.

To better explain what the difference is between Express and non-express installation files, check out this article:

https://technet.microsoft.com/cs-cz/library/cc708603.aspx in the section “Using express installation files”.

To configure WSUS to store updates locally and if you want to minimize disk space, use the below configuration.

clip_image002

If you are certain that the above settings have been configured as such on your WSUS server (including any downstream servers) since the product was installed, then it is likely that the storage requirements on your WSUS server is accurate. The only thing you may want to try is running the Server Cleanup Wizard (WSUS console – Options – Server Cleanup Wizard) because there is an option to delete any EXPIRED updates.

If you believe the settings were changed midstream causing All Languages to be downloaded at one time

Or

If you have recently changed the above settings

Or

If you find a downstream server with the incorrect settings

Or

If you decide to set old updates or non-required updates to Not Approved

… the updates in the WSUSContent folder will not automatically be cleaned up for you.

The only way to clean up your WSUSContent folder in the fewest amount of steps is to RESET the WSUS server and re-download the content for all approved updates.

How to Do a Reset:

Note: You may want to execute the procedure below during off hours as your WSUS server will be downloading quite a bit of data.

1) Correct any settings above or disapprove any unneeded updates.

2) Close any open WSUS consoles.

3) Go to Administrative Tools – Services and STOP the Update Services service.

4) In Windows Explorer browse to the WSUSContent folder (typically D:\WSUS\WSUSContent or C:\WSUS\WSUSContent)

5) Delete ALL the files and folders in the WSUSContent folder.

6) Go to Administrative Tools – Services and START the Update Services service.

7) Open a command prompt and navigate to the folder: C:\Program Files\Update Services\Tools.

8) Run the command WSUSUtil.exe RESET

-This command tells WSUS to check each update in the database, and verify that the content is present in the WSUSContent folder. As it finds that the content is not present in the folder, it executes a BITS job to download the content from Microsoft. This process takes quite a bit of time and runs in the background.

How do you tell when the process is complete?

Other than noticing that the WSUSContent folder is no longer growing you can also check the SoftwareDistribution.log:

C:\Program Files\Update Services\LogFiles\SoftwareDistribution.log

When you start the reset process, you should see a line towards the bottom of the log which looks like this:

WsusService.13 ExecutionContext.runTryCode State Machine Reset Agent Starting

After waiting for some time, check the log again and search for the text “State Machine Reset Agent Finished”

WsusService.13 ExecutionContext.runTryCode State Machine Reset Agent Finished