Paolo Caparrelli Windows 22 June 2022
WinSXS cleanup from superseded components
In order to perform a WinSXS cleanup, you can remove any backup files created during the installation of a service pack by using the following command:
dism /online /cleanup-image /SPSuperseded
Note, that after you execute that command you will no longer be able to uninstall the service pack.
You can further perform a WinSXS cleanup by removing any superseded components:
dism /online /cleanup-image /StartComponentCleanup dism /online /cleanup-image /StartComponentCleanup /ResetBase (Windows 2012R2 and Windows 8.1 only)
Note, that the /ResetBase switch can only be used in Windows 2012R2+ and Windows 8.1+ in order to reset the base of superseded components and optimize the WinSXS cleanup process