- WinSxS is the component repository; its apparent size is misleading due to hard links.
- DISM and the StartComponentCleanup task allow you to safely clean up superseded versions.
- ResetBase saves more space, but prevents uninstalling old updates.
- MSI/Installer cleanup is advanced and carries risks; use with caution.
If your Windows computer starts complaining about lack of space, it's quite likely that you'll come across the folder WinSxS and wondering if you can delete it without consequences. The short answer is no, but you can safely reduce its size using the system's built-in tools. Here you'll find everything you need to know. clean the WinSxS folder without putting your Windows at risk.
Before we get started, it's worth clarifying something key: the WinSxS folder is the component warehouse Windows. It contains system versions, backups for rolling back updates, and items that allow you to add or remove features. Deleting it willy-nilly is a sure recipe for disaster.
What is WinSxS and why does it take up so much space?
WinSxS comes from Side-by-Side Windows and acts as a central repository for system components. In C:\Windows\WinSxS Binaries, manifests, drivers, and metadata essential for installing, applying, and reverting features are stored. updates or repair Windows. Additionally, Windows keeps previous versions for a reasonable amount of time so you can roll back if something goes wrong after an update.
A significant portion of WinSxS content is not “real” duplicate files, but hard links (hard links) that point to the same data on disk. That's why, when you look at the folder properties in Explorer, the "Size" may seem huge, while the "Size on disk" is smaller. DISM also shows an estimate of the "usable" storage space, differentiating between what it shares with Windows itself and what could actually be used. claim.
Windows now automatically cleans up obsolete components after a while (usually after a few 30 days from the time a replacement is installed). This grace period allows for reversal if something goes wrong. Still, if you need to use up space now, it's advisable clean the WinSxS folder on your own.

How to measure the actual size of the component warehouse
To clear up any doubts and have a faithful photo, use DISM. With an elevated Command Prompt, you can scan the vault and see categories like “Shared with Windows” (non-recoverable), “Backups and Disabled Features,” and “Cache and Temps.” That breakdown tells you if a cleaned worth.
Open the Symbol of the system as administrator and run:
Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore
In the output you will see data such as the “Actual Warehouse Size”, the “Date of Last cleaned”, how many packages can be recovered, and whether a cleanup is recommended. If it says “Cleanup recommended: Yes,” go ahead: there’s room for reduction.
Safe ways to clean the WinSxS folder on a running system
There are three main ways to lighten or clean up the WinSxS folder with native tools: Task Scheduler, Utility DISM and the Disk CleanupThey all rely on the same internal mechanisms: removing superseded packages, compressing components, and cleaning up unnecessary backups.
Automatic cleanup with the StartComponentCleanup task
Windows includes a scheduled task that cleans up when your computer is idle. When it runs automatically, wait at least 30 days from the moment a new component is installed before removing previous versions. If you run it manually, it takes approximately 1 hour, so it may not leave everything completely clean the first time.
To run it from the interface, open Task Scheduler and navigate to: Task Scheduler Library \ Microsoft \ Windows \ Servicing \ StartComponentCleanupWith the item selected, click "Run." You can also run it from the command line:
schtasks.exe /Run /TN "\Microsoft\Windows\Servicing\StartComponentCleanup"
This option is conservative and respects the grace period. If you're in a hurry for gigabytes, the next DISM method is more straightforward and doesn't impose that grace period. postponement.
Cleaning with DISM: more control and no grace period
DISM (Deployment Image Servicing and Management) is the official tool for repairing, maintaining, and optimizing Windows images, including live installations. The /Cleanup-Image It offers several actions that, when used wisely, recover many megabytes in a short time.
To force the immediate cleaning of replaced components, execute:
Dism.exe /Online /Cleanup-Image /StartComponentCleanup
If your system is stable and you don't need to roll back previous updates, you can consolidate the store with /ResetBase. This modifier removes all superseded versions of each component and leaves the last installed version as the base. Keep in mind that after this, you will no longer be able to uninstall old updates.
Consolidation base:
Dism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase
On older systems with Service Packs, there's also the option to remove the backup files from that package to save more space. This prevents you from uninstalling the SP in the future, so only use it if you're sure you can.
Command to discard Service Pack copies:
Dism.exe /Online /Cleanup-Image /SPSuperseded
Historical note: WinSxS's growth was famous in Windows 7. It had been available since SP1. compcln.exe to consolidate components, and later equivalent DISM options arrived. In Windows 10 and later, repository maintenance is much more refined and secure.
Reduce WinSxS with Disk Cleanup
If you prefer a graphical interface for cleaning the WinSxS folder, the classic Windows Space Cleanup utility also helps. The important thing is to activate the “Windows Update" (or "Windows Update Cleanup"), which is the one that actually impacts the component store. Scanning and removal can take quite a while.
Steps recommended:
- press Windows + R, writes cleanmgr and accept. In the drive selector, choose your system drive (usually C:).
- When the window appears, press “Clean system files” (needs administrator permissions) and waits for the analysis.
- Check “Windows Updates,” “Temporary Files,” “Log Files,” and any other relevant categories. Confirm with “OK".
On computers with many updates, the cleanup process can take several hours. It's normal to see the disk working nonstop; let the process complete to consolidate space and avoid inconsistencies. store.

Advanced Cleanup for Administrators: Removing Features and Their Payload
On servers and managed computers, you can further reduce disk space by unloading Windows features that are available but not installed (called payloads). That doesn't mean cleaning up the WinSxS folder thoroughly. This frees up several hundred MB or a few GB, depending on the case, but it has an impact: if you want to install that feature later, you'll need a source (WIM/ISO).
With PowerShell, lists the status of roles and features:
Get-WindowsFeature
To remove the payload of a specific feature, for example Hyper-V:
Uninstall-WindowsFeature Hyper-V -Remove
To download at once all payloads in “Available” status (available but not installed):
Get-WindowsFeature | Where-Object { $_.InstallState -eq "Available" } | Uninstall-WindowsFeature -Remove
If you later need to reinstall a feature, you can do so by pointing to the installation media Windows. For example, using a WIM image of drive D:
Install-WindowsFeature NombreDelServicio -Restart -Source wim:D:\sources\install.wim:4
To know what index corresponds to your edition within the WIM, use:
dism /get-wiminfo /getfile:D:\sources\install.wim
This route involves a risk This is especially important if it's not well documented in your organization. Use it when managing golden images, servers with very specific roles, or VDI environments where you need lightweight templates and full control over what's included.
Another space focus: C:\Windows\Installer and the PatchCache
If you still need to free up more space and you know what you're doing, there is an additional tactic related to MSI installers to clean up the WinSxS folder. C:\Windows\Installer Stores installers and patches that apps use to maintain and uninstall. Tapping here has serious risks: abruptly deleting entries can break uninstallations or program repairs.
An advanced technique is to adjust the size of the PatchCache and empty it in a controlled manner. Do this only if you are happy with the compromise and understand that it may affect certain MSI installations. Guidelines (Always in CMD with administrator rights) administrator):
- stop the Windows Installer service:
net stop msiserver /y - set the patch cache to 0 to allow cleaning:
reg add HKLM\Software\Policies\Microsoft\Windows\Installer /v MaxPatchCacheSize /t REG_DWORD /d 0 /f - Delete the cache directory:
rmdir /q /s %WINDIR%\Installer\$PatchCache$ - Starts and stop the service again to apply the change:
net start msiserver /y net stop msiserver /y - Restore the cache to a default value (for example, 10):
reg add HKLM\Software\Policies\Microsoft\Windows\Installer /v MaxPatchCacheSize /t REG_DWORD /d 10 /f - Starts again the service:
net start msiserver /y
I emphasize the warning: manipulating this folder and its cache is for advanced users. If an application starts asking for an MSI that is no longer there, you will have to provide the original installer to repair or uninstall correctly.
FAQs
- Can I delete the WinSxS folder? No. It's a critical part of the system. The right thing to do is clean it with the tools Windows provides, which know what can and can't be removed.
- Why does Explorer show a much larger “Size” than DISM? Because WinSxS uses hard links, Explorer adds up the sizes of linked files multiple times, while DISM calculates the "real" space and categorizes it into reclaimable or shared categories.
- What exactly does /ResetBase do? Consolidate your repository by deleting all superseded versions. You'll gain space, but you'll lose the ability to uninstall old updates. Only use this if you're confident about the system's health.
- I just cleaned the WinSxS folder and it's not resized, is this wrong? Not necessarily. There may not have been much recoverable at the time, or the metric you're looking at may not reflect the effect well (due to hard links). Rely on the DISM analysis and check if there are any "recoverable packets" left.
- How much space can be freed up? It depends on the update history and roles. On well-established computers, freeing up 15% to 20% of the apparent WinSxS size is a typical result; in other cases, the margin is smaller.
- How long it takes? From a few minutes to hours. Space Cleanup with "Windows Update" checked is usually the slowest; DISM is more direct, but the result depends on the volume of components replaced.
With all the above you already have a clear map for clean the WinSxS folder. If you add to all this information good update practices and, in professional environments, the elimination of payloads and the care of reference images, keeping the component warehouse under control becomes just another maintenance procedure, without scares or problems. risks unnecessary.
Editor specialized in technology and internet issues with more than ten years of experience in different digital media. I have worked as an editor and content creator for e-commerce, communication, online marketing and advertising companies. I have also written on economics, finance and other sectors websites. My work is also my passion. Now, through my articles in Tecnobits, I try to explore all the news and new opportunities that the world of technology offers us every day to improve our lives.
