What is the WinSxS folder, and what is it used for: How to delete unnecessary content to recover disk or SSD space?
A portable program like WinDirStat helps you understand which files and folders are taking up the most disk space and, consequently, finding the heaviest software: see Uninstalling useless programs in Windows: some tips.
By running a program like WinDirStat, you will notice the presence – on the drive containing the operating system – of a folder called WinSxS, which takes up a lot of disk space or SSD.
The size of the WinSxS folder can become important, and accessing it (the path is % windir% \ WinSxS) will contain thousands of folders referring to Windows components, system elements, and drivers.
Many of the system files initially end up in subfolders of \ Windows \ WinSxS and from there they are routed to other folders such as \ Windows and \ Windows \ System32.
The WinSxS folder is used as a “support” both by Windows Update and by the operating system: it is used to restore the operation of a previous version of Windows, restore damaged files, add or remove Windows features, etc.
When you install new quality updates for Windows (think of the ones that Microsoft releases every second Tuesday of the month), the modified files and the old versions, are added to the WinSxS folder. With time, therefore, the size of the WinSxS folder tends to grow inexorably.
Using the WinDirStat utility or right-clicking on the WinSxS folder, choosing Properties, the space occupied is not the one occupied (the displayed value is incorrect).
This happens because, for part of the WinSxS folder’s contents, the operating system uses a mechanism called hard linking. That is, Windows refers to the latest versions of the files present in WinSxS from other locations (read folders) of the operating system. The files saved in the WinSxS folder will also appear as if they were saved in other folders.
Given the fact that before acting on the contents of the WinSxS folder to recover space, it would be preferable to follow the instructions given in the article cited at the beginning; if the operating system is stable and does not highlight any type of problem, it is still possible to opt for the cleaning of system files.
Suppose the operating system is stable after installing the Windows updates and no problems have been detected. In that case, you can remove the elements of the WinSxS folder you no longer use using a few simple commands.
First, type in cmd in the Windows search box then press the CTRL + SHIFT + ENTER key combination. This will open the command prompt with administrator rights.
Here, by writing dism /Online /Cleanup-Image /AnalyzeComponentStore, you can first check how much space the WinSxS folder occupies.
At the bottom of the report, you will read ” Recommended components store cleaning “: if ” Yes ” is written to the right of the sentence, Windows itself – given the size of the folder – suggests a bit of cleaning.
To remove the WinSxS elements no longer used by Windows, just type the following command:
dism /online /Cleanup-Image /StartComponentCleanup
If you do not want to go to the command prompt, you can use the Disk Cleanup tool that probably Microsoft will delete from future versions of Windows 10 but can currently be used without any problems. We talked about it in the Disk Cleanup article. Can you delete everything that is proposed?
To delete the unused contents of the WinSxS folder, just type Disk Cleanup in the search box of the operating system, choose the drive on which Windows is installed, click on the Clean system files button then check Clean Windows Update and finally confirm with a click on OK.
Similar cleaning functionality is available by accessing the Windows 10 Memory Sense (choose Enable Memory Sense from the operating system search box). This is the system component that is likely to take the place of Disk Cleanup.
You will have to click on the Temporary files entry, make sure that the Windows Update Cleanup box is checked, and click on Remove files.
A tech-savvy writer with a knack for finding the latest technology in the market, this is what describes John Carter. With more than 8 years of experience as a journalist, John graduated as an engineer and ventured soon into the world of online journalism. His interest includes gadget reviews, decoding OS errors, hunting information on the latest technology, and so on.