The WinSxS folder is the Component Store located in your C:\Windows directory where core Windows files reside including the bits needed to turn on and off any Windows features you enable from the Control Panel. Not only are these files critical to the operation of Windows 10 but when updates to Windows are installed, these files get updated. Every time you receive updates for the OS, the WinSxS folder dramatically grows in size. A commonly asked question by many people is "Why is the WinSxS folder so big?" Here is how you can clean up the WinSxS folder and reduce its size in Windows 10.
Cleaning up the Component Store (WinSxS) can be done using the Disk Cleanup built-in tool and with a console app Dism. We already reviewed the Disk Cleanup method in one of the previous articles. If you are interested in reading it, see How to clean up WinSxS folder in Windows 10.
Today, we'll see how the same can be done with Dism.
To clean up the WinSxS Folder in Windows 10 with Dism, follow the instructions below.
- Open an elevated command prompt.
- Type or copy-paste the following command:
Dism.exe /online /Cleanup-Image /StartComponentCleanup
Hit the Enter key to execute it.
- The command will produce the following output:
The argument /StartComponentCleanup parameter of Dism.exe will remove all previous versions of the updated system components and save your disk space.
You can combine it with another command line argument, /ResetBase.
When specified, it will make Dism remove all superseded versions of system components in the component store.
The full command looks as follows:
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
It is worth mentioning that Windows 10 can do the component store cleanup (WinSxS) automatically. There is a special task in Task Scheduler which removes all previous versions of updated components 30 days after an updated component has been installed. You can find it in the folder Task Scheduler Library\Microsoft\Windows\Servicing. It is named StartComponentCleanup. See the following screenshot.
Note: It is not required to launch it manually. The task will be started automatically once the operating system enters the idle state.