The Windows component store, or WinSxS folder, contains various files that make up the Windows operating system. However, it can grow significantly and accumulate unnecessary files over time, taking up valuable disk space and causing a slowdown. If you don’t want the component store to negatively impact your device, it’s essential to accurately assess how much disk space it occupies and determine if a cleanup is necessary.
To make it easier for IT administrators and advanced users to maintain this folder, we’ve created this guide on how to properly analyze the component store in Windows 10 using the built-in DISM (Deployment Imaging Service and Management) tool.
Analyzing the component store using DISM
DISM is a command-line tool for IT professionals and administrators to service Windows images. It is also often used to safely analyze and clean up the WinSxS folder.
Note: The DISM tool requires elevated permissions to analyze and clean the component store. Without administrator rights, the commands won’t execute properly.
- Open an elevated PowerShell or Command Prompt. Press Windows key + R, type “powershell” or “cmd,” and press Ctrl + Shift + Enter.
- Copy and paste this analysis command, and press Enter:
Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore
Note: This command is only for diagnostic purposes and won’t make any changes to your system. - Review the output. Here are the results you’ll see and what each entry means:
- Windows Explorer Reported Size of Component Store: This is the folder size shown in File Explorer, which does not account for hard links, making its size misleadingly large.
- Actual Size of Component Store: This is the true and accurate size of the folder, considering hard links. It is broken down into three:
- Shared with Windows: The amount of disk space occupied by files that are hard-linked with other parts of the system.
- Backups and Disabled Features: The space used by older versions of the system components, which is used to roll back updates and installed but currently disabled features.
- Cache and Temporary Data: The size of files used to make temporary operations like servicing, updates, and cleanup a lot faster.
- Date of Last Cleanup: This shows the most recent component store cleanup date.
- Number of Reclaimable Packages: This is the number of superseded packages that can be removed via the cleanup command.
- Component Store Cleanup Recommended: This Yes or No recommendation may help reduce the size of the component store overhead. If the result is No, no action is necessary. If it’s Yes, consider performing a component store cleanup.
Performing a component store cleanup
Cleaning up the component store will remove unnecessary files from the WinSxS folder, free up disk space, and improve system performance.
Standard cleanup
A standard cleanup is a safe option that you can do anytime. It will remove old versions of system components replaced by newer updates, and keep the current version and any components still required for system stability or rollback of recent updates.
To do a standard cleanup using DISM, copy and paste this cleanup command on an elevated Command Prompt or PowerShell and press Enter:
Dism.exe /Online /Cleanup-Image /StartComponentCleanup
Cleanup with base reset
This optional and more aggressive cleanup method performs everything the standard cleanup method does, while permanently deleting all superseded versions of every component. This will consolidate the component store so that only the most current versions remain.
To do a cleanup with base reset, copy and paste this command on an elevated Command Prompt or PowerShell and press Enter:
Dism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase
Note: This will make it impossible to uninstall the latest updates installed before running the ResetBase command.
What is the component store in Windows?
The component store refers to the WinSxS (Windows Side-by-Side) folder located at C:\Windows\WinSxS. It is a critical directory that stores all the necessary files for Windows to function correctly by supporting various features and updates. Here are a few examples of what these files do:
- Stores essential system files for feature and security updates
- Supports installation and removal of Windows components using DISM and Windows Update
- Allows rolling back to previous versions to resolve issues caused by updates
- Prevents conflicts when different apps try to use incompatible versions of the same file
Why analyze the component store?
As new updates and versions are installed, the WinSxS folder will continue to store files that may no longer be required and take up more space, leading users to question its size and necessity. However, haphazardly deleting the folder or its contents can lead to severe system instability and boot issues. Therefore, it is crucial to analyze the WinSxS folder to:
- Accurately determine its actual disk usage;
- Identify unnecessary files that can be removed safely; and
- Maintain optimal system performance by freeing up disk space.
Understanding how the WinSxS folder stores files
The WinSxS folder contains multiple versions of system files to support various Windows features and updates. Due to hard linking, a file may appear in multiple locations but only occupy one physical space on the disk. This causes discrepancies when Windows Explorer displays the file size of every copy, but there’s only one actual item on the disk. Hence, the component store needs to be analyzed before the WinSxS folder cleanup.
Frequently Asked Questions (FAQ)
Is it safe to delete WinSxS files?
Manually deleting files is not a safe way to clean up the WinSxS folder. Although it may look bloated in size, WinSxS contains critical system components that Windows uses to operate correctly. Improper deletion can break Windows Update, prevent features from working, and make the system unstable. It’s best to use official tools like DISM to reduce the WinSxS folder size.
How often should I clean up the WinSxS folder?
You don’t need to clean the WinSxS folder frequently. Windows performs automatic maintenance, but it’s generally safe to do manual cleanup every few months, after a major Windows update, or when disk space is low.
Are there other ways to clean the WinSxS folder aside from DISM?
Yes. In addition to DISM, you can use other built-in tools, such as Disk Cleanup and Task Scheduler, to safely clean up the WinSxS folder.
Optimizing the component store size the smart way
Regularly maintaining the WinSxS folder should help ensure an efficient system and keep your Windows 10 disk space free from unnecessary files. Using DISM to analyze the component store can help users gain insight into its actual size and determine if a cleanup operation is necessary. Be wise when choosing between the standard and base reset cleanup to ensure you can reverse updates when necessary. With proper maintenance, you can strike a good balance between preserving system functionality and maximizing storage efficiency.