Determine the Actual Size of the WinSxS Folder

The component store (WinSxS folder) contains components that make-up Windows and allow you operate your system. These components are kept in this folder in case you need to rollback changes or repair corrupted files.

Files in this folder might appear to be stored in more than one place in the operating system, but there's usually only one copy of the file and the rest of the copies are actually hard links. Some tools, such as the File Explorer, determine the size of directories without taking into account that the contained files might be hard linked, which might lead you to think that the WinSxS folder takes up more disk space than it really does.

DISM includes functionality that can determine how much disk space the WinSxS folder really uses.

Warning

Some important system files are located only in the WinSxS folder. Deleting files from the WinSxS folder or deleting the entire WinSxS folder might severely damage your system, so that your PC might not boot, and make it impossible to update.

Determine the true the size of the component store

DISM includes functionality that can determine the actual size of the WinSxS folder.

Analyze the component store

Open a Command prompt as administrator and use DISM with the /Cleanup-Image /AnalyzeComponentstore options:

Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore

Here's the information that's available in the output:

Title Description
Windows Explorer Reported Size of Component Store This value the size of the WinSxS folder if computed by Windows Explorer. This value doesn’t factor in the use of hard links within the WinSxS folder.
Actual Size of Component Store This value factors in hard links within the WinSxS folder. It doesn’t exclude files that are shared with Windows by using hard links.
Shared with Windows This value provides the size of files that are hard linked so that they appear both in the component store and in other locations (for the normal operation of Windows). This is included in the actual size, but shouldn’t be considered part of the component store overhead.
Backups and Disabled Features This is the size of the components that are being kept to respond to failures in newer components or to provide the option of enabling more functionality. It also includes the size of component store metadata and side-by-side components.

This is included in the actual size and is part of the component store overhead.
Cache and Temporary Data This is the size of files that are used internally by the component store to make component servicing operations faster. This is included in the actual size and is part of the component store overhead.
Date of Last Cleanup This is the date of the most recently completed component store cleanup.
Number of Reclaimable Packages This is the number of superseded packages on the system that component cleanup can remove.
Component Store Cleanup Recommended This is a component store cleanup recommendation. Cleanup is recommended when performing a cleanup process may reduce the size of the component store overhead.

Find the size

Based on the output from when you ran Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore, you can determine the overhead of the WinSxS folder by taking the sum of the backups and disabled features size with the cache and temporary data size.

Example output:

C:\>dism /online /cleanup-image /analyzecomponentstore

Deployment Image Servicing and Management tool
Version: 10.0.XXXX.0

Image Version: 10.0.XXXX.0

[==========================100.0%==========================]

Component Store (WinSxS) information:

Windows Explorer Reported Size of Component Store : 4.98 GB

Actual Size of Component Store : 4.88 GB

    Shared with Windows : 4.38 GB
    Backups and Disabled Features : 506.90 MB
    Cache and Temporary Data : 279.52 KB

Date of Last Cleanup : 2021-06-24 23:32:22

Number of Reclaimable Packages : 0
Component Store Cleanup Recommended : No

The operation completed successfully.
  • In this example, the WinSxS folder appears to be 4.98 GB, but the actual overhead (the sum of the size of backups and disabled features and the size of cache and temporary data) is 507.18 MB.

  • If cleanup is recommended then follow steps in Clean Up the WinSxS Folder.

Manage the Component Store

Clean Up the WinSxS Folder

Where Did My Space Go? (blog post)

NTFS Metafiles blog post

DISM Operating System Package Servicing Command-Line Options