In this blog I will be discussing about how to increase the disk space of your system running Windows operating system. I will be explaining how to reduce the WinSXS Folder which located under c:\windows.
What is WinSxS Folder
This is a folder with location c:\Windows\WinSxS which contains the source of all Windows Update. This folder creates a backup of the Windows Update for the reason if we need to uninstall the problematic updates / patches from the system. Hence, the folder size keeps on growing with every new patch installed.
WinSxS folder is also called Windows Component Store files. This folder is not just valid for Windows workstations to store patches, but also for Windows Server to store files for:
- Enabling or Disabling Windows features.
- Adding roles or features using Server Manager
- System Recovery from corruption or boot failures
These files are maintained using a technique called Hard linking.
For Windows 10 & Windows Server 2016 & above, there in inbuilt methods which reduces the size of WinSxS folder automatically by keeping multiple copies of versions and deleting it after a certain period of time.
Can we delete files from WinSxS folder
Yes, we can delete, but not directly by navigating the folder. You can delete the files by using inbuilt tools in Windows.
Check WinSxS folder size
You can check the folder size by looking into properties of c:\Windows\WinSxS folder size.
There is a command line also which will show you Windows Component Store folder size, which is WinSxS folder.
Following command line to be run with Elevated rights:
Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore
This will show “Windows Explorer Reported Size of Component Store” value indicating the size of the WinSxS folder.
Cleanup Windows Update / WinSxS folder
There are 2 ways to do that:
1. Through Disk Cleanup
Click on start menu and type “Disk Cleanup” and launch it. Click on “Clean up system files”. This will provide you the option with “Windows Update Cleanup”. Check the box and click on OK.
2. Dism Command line
Launch cmd prompt with Elevated rights and run following command:
Dism.exe /online /Cleanup-Image /StartComponentCleanup
Once execution is completed, we can verify running the command to see the result. We can see the Windows Component Store has reduced to 6.92 GB from 11.19 GB