Walker News

Calculate WinSxS Folder Actual Size And Trim Its Footprint

The \Windows\WinSxS folder is the location of Windows Component Store. In Windows 10, recovery image is removed and Windows Component Store is used as source for system recovery or reset Windows to initial installation state.

If you want to find out how much disk space being used by WinSxS folder, you should not refer to Windows File Explorer. This is because File Explorer does not factor in hard links used in WinSxS folder during size calculation.
Unlike shortcut, hard link is a file system object that appears exactly like an ordinary file (not shortcut!) refers to disk location of data. Imagine there are hard link A and B refer to the same disk location (not file!), then deleting hard link A will not affect hard link B read/write operation on that location. A shortcut will become useless when the file it refers to is deleted/renamed/moved. You can delete hard link, but you cannot delete “disk location” referred by hard link.

In order to determine the actual size of WinSxS folder, TechNet article suggests to use Deployment Image Servicing and Management tool (dism.exe):
dism.exe /online /cleanup-image /AnalyzeComponentStore

The proper and safest way to reduce WinSxS folder size is by using cleanmgr.exe (native disk cleanup tool) and select option to clean up system files.

Uses dism.exe to calculate actual disk space used by WinSxS folder.

As shown in the screenshot, the actual size of Windows Component Store (WinSxS) has reduced after housekeeping done by cleanmgr.exe utility.

See also Manage the Windows Component Store.

Custom Search

2018  •  Privacy Policy