If you have a large amount of updates which need cleaning, the Server Cleanup Wizard often freezes making it impossible to clean old updates from the WSUS Database.
If this happens, install SQL Management Studio onto the server an connect to the Windows Internal Database used by WSUS.
Run the following query to clean up old updates (this can take hours to run):
CREATE TABLE #results (Col1 INT)
INSERT INTO #results(Col1) EXEC spGetObsoleteUpdatesToCleanup
DECLARE WC Cursor
SELECT Col1 FROM #results
WHILE (@@FETCH_STATUS > -1)
BEGIN SET @msg = 'Deleting ' + CONVERT(varchar(10), @var1)
RAISERROR(@msg,0,1) WITH NOWAIT EXEC spDeleteUpdate @localUpdateID=@var1
FETCH NEXT FROM WC INTO @var1 END
DROP TABLE #results
After a few hours the query should finish. Once finished, you will need to run a "wsusutil reset" from an elevated command prompt.
"wsusutil reset" will also take a few hours to complete as it needs to scan every update on disk against the database and delete any that no longer exist in the database.
Hope this post has been helpful.