To check the actual capacity of this Windows component store, open a Command Prompt window with admin rights and enter:
Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore
Note : The / AnalyzeComponentStore option isnot recognized on Windows 8 and earlier.
After analysis, actual capacity is reduced to 5.37GB. This value affects hard links in the WinSxS directory. Shared with Windows gives you the file size to be hard linked. The Date of Last Cleanup is the recently completed component repository cleanup date.
Many users often ask if it is possible to manually delete files from the WinSxS folder. The answer is no.
Deleting files will most likely damage Windows, and critical Windows updates may not install properly. Even if you successfully delete a file from the WinSxS folder, you will never know which application will stop working.
However, you can reduce the size of the WinSxS folder with some built-in tools. We'll use tools like Disk Cleanup, the DISM command, and delete Features on Demand to cut down on the WinSxS folder.
In the search box, type disk cleanup and select Disk Cleanup. From this window, click the Clean up system file button . This restarts the utility and unlocks access to the full range of cleaning options. You can delete installation files, earlier versions of Windows, etc. The Disk Cleanup tool is a starting point for cleaning Windows 10.
Windows allows you to enable or disable Windows Features on Demand by default. You can add some useful features - Hyper V, Print to PDF, Windows Subsystem for Linux (WSL), etc.
Features that you unchecked are still in the WinSxS folder and take up disk space. Users with low storage capacity may want to cut back on Windows installation as much as possible. Open a Command Prompt window with admin rights and enter:
DISM.exe /Online /English /Get-Features /Format:Table
You will see a list of the features names and their status.
To remove a feature from the system, type:
DISM.exe /Online /Disable-Feature /featurename:NAME /Remove
(Replace 'NAME' with the name of the object mentioned in the list).
Remove a feature from the systemIf you run the / Get-Features command again , you will see a status of 'Disabled with Payload Removed' instead of just 'Disabled' . Then, if you choose to install the removed components, Windows will prompt you to re-download the component files.
Windows 8 / 8.1 has a built-in feature to automatically clean the component store when the system is not in use. Open Task Scheduler and navigate to Microsoft> Windows> Servicing . Right-click on the item and select Run.
The task will wait at least 30 days after an updated component is installed, before uninstalling the previous version of that component. The task also has a one-hour timeout and may not delete all files.
With the DISM / Cleanup-Image parameter , you can immediately delete the previous version of the component (there is no 30-day grace period) and there's no 1 hour time limit. Open Command Prompt (Admin) and enter:
DISM.exe /online /Cleanup-Image /StartComponentCleanup
If you add a ResetBase switch , you can delete all alternate versions of every component. But remember that you won't be able to uninstall any of the current updates (even if they fail).
DISM.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
The following command will remove any backup components needed to uninstall the service pack. This is a set of cumulative updates for a specific version of Windows.
DISM.exe /online /Cleanup-Image /SPSuperseded
The last resort is that you can wipe the WinSxS folder to free up Windows space. However, the instructions should be carefully followed to avoid causing serious errors on the system.