Windows Update Cleanup
- Category: Windows
Use DISM to cleanup WinSxS after Windows Update
dism /online /Cleanup-Image /StartComponentCleanup
This option is the same as using the Task Scheduler method, but now the updated components are immediately deleted. If had used the task, it will only clean up if the updated components are longer then 30 days installed on the system.
dism /online /Cleanup-Image /StartComponentCleanup /ResetBase
The /ResetBase switch option also deletes all superseded versions of every component in the component store. A warning if you want to use it on systems in production: All existing service packs and updates cannot be uninstalled after this command is completed. But this option will not block the uninstallation of service packs or updates installed later on.
dism /online /Cleanup-Image /SPSuperseded
The /SPSuperseded switch option removes all backup components needed to uninstall the service pack. Also a sidenote here, you cannot remove the service pack anymore after using this command.