Over time your patch folder (\ManagementSuite\ldlogon\patch\) on the core server will fill – and you will have numerous old patches that are no longer referenced/used. In order to clean this problem up from time to time you should follow the steps below:
1. Create a folder named PatchMaintenance at \ManagementSuite\ldlogon\patch\
2. Create a batch file at this location with the following contents:
for /f %%i in (list.txt) do del "%%i"
3. Execute the following SQL command against your ldms database:
select distinct patch from computervulnerability where detected=0 and patch != '*'
*Note – this will find any patch that is no longer detected in your environment and that has no enabled fixes.
4. Copy the returned list into a file called “list.txt”
5. Place the list.txt file into the \ManagementSuite\ldlogon\patch\PatchMaintenance\ folder
6. When you are ready to run the cleanup; copy both the list.txt and the batch file to \ManagementSuite\ldlogon\patch\
7. Execute the script with administrator rights
8. Remove the script and the list.txt from the patch folder when completed