Cleaning up the Windows Server component store with DISM
Analyse and clean up the Windows Server component store with DISM and the maintenance scheduled task.
On Windows Server, the component store can take up a lot of space as updates accumulate. The tools below clean it up, first with the graphical disk cleanup tool and then from the command line with DISM.
Disk cleanup
cleanmgr.exe
Analyse the component store
dism.exe /Online /Cleanup-Image /AnalyzeComponentStore
Clean up the component store
dism.exe /Online /Cleanup-Image /StartComponentCleanup
The same operation can be started through the Windows maintenance scheduled task:
schtasks.exe /Run /TN "\Microsoft\Windows\Servicing\StartComponentCleanup"
Remove superseded versions
dism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase
Notes
- The
/ResetBaseoption removes the superseded versions of components. Once it has run, earlier updates can no longer be uninstalled. - The
/SPSupersededcommand is flagged with a warning in the source note, with no further detail. Do not run it without checking the DISM documentation first.