NOTE: Deleting files from the WinSxS folder or deleting the entire WinSxS folder may severely damage your system so that your PC might not boot and make it impossible to update.
The DISM command tool lets you deal with WinSxS folder.
You can use DISM with Windows cabinet (.cab) or Windows Update Stand-alone Installer (.msu) files to install or remove updates, service packs, language packs, and to enable or disable Windows features.
Let’s see some examples of this tool:
First, use analysis you can determine the overhead of the WinSxS folder:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore Deployment Image Servicing and Management tool Version: 10.0.16299.15 Image Version: 10.0.16299.192 [==========================100.0%==========================] Component Store (WinSxS) information: Windows Explorer Reported Size of Component Store : 6.18 GB Actual Size of Component Store : 6.03 GB Shared with Windows : 5.18 GB Backups and Disabled Features : 551.75 MB Cache and Temporary Data : 293.13 MB Date of Last Cleanup : 2018-01-21 16:21:28 Number of Reclaimable Packages : 0 Component Store Cleanup Recommended : No The operation completed successfully. |
In this example, the WinSxS folder appears to be 5.18 GB, but the actual overhead (the sum of the size of backups and disabled features and the size of the cache and temporary data) is 551.75 MB.
This tool also provides more options to further reduce the size of the WinSxS folder:
1 2 3 4 5 6 7 8 9 | Dism.exe /online /Cleanup-Image /StartComponentCleanup Deployment Image Servicing and Management tool Version: 10.0.16299.15 Image Version: 10.0.16299.192 [==========================100.0%==========================] The operation completed successfully. |
The last option ( is not show in this tutorial ) is to analyze the size of the Component Store in an offline Windows image.
You need to copy a .wim file, a .vhd, or a .vhdx that contains a Windows image and then you can start the cleanup of the image.