# [SOLVED] WSUS PURGE not working



## CovenStine (Sep 8, 2008)

Hey all,
I'm trying to get a WSUS server to be a little less of a resource hog; it's gone unmanaged for a while (the person that set it up built it to set it/forget it, and has since left)
For some reason, it's got almost 70 gb of updates and 8gb of database files, leaving about 9mb free on an 80gb drive.
I believe part of the problem stems from the over 10000 updates marked 'driver' in the DB, which I want to remove.
I looked up how to get rid of unwanted files in the DB, did a search for '*driver*' in the manager, and declined all 10,132ish drivers found.
Then, I downloaded WsusDebugTool and put it in c:\program files\update services\tools.
Upon running

```
c:\Program Files\update services\tools>WsusDebugTool.exe /Tool:PurgeUnneededFiles
```
, it hung at "Starting a state machine reset"
I let it churn away for a while (no, not 5 minutes. hours) and nothing changed; the memory usage barely increased on any processes.
I've tried scripting it to stop/restart services, all to no avail. My HDD still has only 9mb of free space, and my DB still has 23k entries, 10k of which are drivers/declined.
Right now, the script that I'm running is as follows:

```
;Cleaning up the WSUS directory/drive
setlocal
pushd "c:\program files\update services\tools"

echo Stopping WSUS
net stop "Update Services"

echo Stopping IIS Admin Service
net stop iisadmin

echo Deleting Unneeded Revisions
wsusutil.exe deleteunneededrevisions

echo Starting WSUS
net start "Update Services"
WsusDebugTool.exe /Tool:PurgeUnneededFiles

echo Starting IIS Admin
iisreset

echo operation complete

popd
endlocal

pause
```
I'm not a programmer by trade or anything, nor a trained IT pro, I'm pretty much self taught, so the simpler your answer, the better I'll follow it...
Any insight you can offer would be appreciated,
Cheers,
~C


----------



## Wand3r3r (Sep 17, 2010)

*Re: WSUS PURGE not working*

strange as it may seem you need space to free up space. you have no space which is why things are not working.

consider cloning this drive to a larger one and then run your purge again.

I don't know what the impact would be if you just removed the files without the wsus doing the removal.


----------



## CovenStine (Sep 8, 2008)

*Re: WSUS PURGE not working*

thank you for your suggestion, it worked fine.
I was expecting the process to use space on the server's primary drive, rather than the database drive.
My problem now is that it's a virtual server, and I've increased the space in the server is allocated, and increased the partition size of D:\ using DiskPart, but now that I'm looking to reallocate the space back to it's prior use, but i can't find any free server tools to do that with, and DiskPart can't shrink on 2003.
But that's another issue entirely. 
Thanks again for your help!


----------



## Wand3r3r (Sep 17, 2010)

*Re: WSUS PURGE not working*

Glad it worked out for you and apprieciate the update.


----------

