- WinSxS is the component store; it is not manually deleted and its "size" in Explorer is usually inflated by hard links.
- DISM allows you to analyze and clean: StartComponentCleanup, ResetBase (without rollback) and, in legacy systems, SPSuperseded.
- The Task Scheduler automates cleanup with a grace period; the Disk Cleanup tool operates via a GUI on Windows Update.
- If there are no recoverable packages, you won't see any savings: it's a sign that the storage is already optimized and the rest is shared with others. Windows.

If storage Your PC's storage is running at a low capacity and the system folder is starting to take up several gigabytes, so you're probably wondering how to clean up WinSxS without breaking anything. In Windows, the component store is sensitive and, although it grows with There, It should not be manually deleted.Here you will find everything you need to know to reduce its size with the right tools.
In the following lines, you'll see why WinSxS grows so large, how to check its "real" size, and the official methods for reducing it using Task Scheduler, DISM, and Disk Cleanup. We also cover common questions, cases where it "doesn't shrink at all," and an extra step to free up space with the Installer folder (with caution). The idea is that you recover space safely and understand what you are doing at each step.
What is the WinSxS folder and why does it grow over time?
WinSxS is the Windows "component store", located by default in C:\Windows\WinSxSThis directory stores system component versions, updates, and packages needed to install new features and, if necessary, rollback safelyTherefore, when the system is updated, previous versions are kept for a while, and later they are automatically removed if they are no longer needed.
One key point: much of its content is hard linksThat is, references to files that physically reside in another location on the system. This makes WinSxS appear to be enormous in Explorer, even though a good portion of it is shared with Windows and doesn't occupy disk space twice. Thanks to this mechanism, the system maintains compatibility and allows for repairing or reverting components when necessary.
WinSxS participates in all installations and system updatesIn addition to providing standard functionalities (printing, opening certain file types, etc.), manually deleting its contents is not an option. Touching what you shouldn't can leave the system unstable. or prevent the uninstallation of patches.
To handle its growth, Windows integrates tasks and utilities that clean up superseded versions and compress components safely. We'll see how to activate them, what each one does, and when it is appropriate to use them depending on your scenario.
How to interpret the size of WinSxS: Explorer vs. actual size
One common problem is that Explorer might show, for example, 7,6 GB of "Size" and 4,6 GB of "Size on disk," while DISM reports different figures. This happens because Explorer adds hard links and other metadata. inflating the visual figureTo view relevant warehouse data, use DISM analytics.
Open a Symbol of the system run it as administrator analysis of the component warehouse. The command is:
Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore
The result will display several very useful fields. Take a look at these: “Actual size of the component warehouse” (the number that matters), “Shared with Windows” (non-deletable files used by the system), “Backups and disabled features” (candidates for cleanup if you don't need to revert), and “Cache and temporary data” (usually reducible). You'll also see “Date of last cleanup,” “Number of recoverable packages,” and whether “cleanup is recommended.” This will tell you if there are any possible savings. or if your system is already optimized.
In real-world scenarios, striking differences emerge: DISM might indicate, for example, that "Shared with Windows" is several GB that you won't be able to reduce, while "Cache" is 0 bytes. In that context, even if you run cleanups, You won't see a noticeable drop.Because there's almost nothing recoverable. That doesn't mean the process has failed; it means there's no more "fat" left to remove.
Safe methods to reduce the size of WinSxS
Windows offers three main ways to clean the component store on a running system: Task Scheduler (using the StartComponentCleanup task), the DISM tool (with various modifiers), and Disk Cleanup. In image preparation environments, you can also apply these techniques offline. The key is to use the built-in tools and avoid manual deletions.
Task Scheduler: StartComponentCleanup
Windows schedules an automatic task that cleans up components when the computer is idle. This task waits at least 30 days after the installation of an updated component before removing older versions, and when run automatically, it has a waiting time of 1 hourTherefore, it may not complete absolutely everything in a single cycle.
If you want to run it manually, open Task Scheduler and navigate to the path Task Scheduler Library\Microsoft\Windows\Servicing. There you will see the task “StartComponentCleanupYou can launch it from the console or directly with this command:
schtasks.exe /Run /TN "\Microsoft\Windows\Servicing\StartComponentCleanup"
Please note that, since it runs automatically, it respects the 30-day grace period. If you need immediate cleaning (and without a 1-hour limit), Go to the DISM section to force more options.
DISM: Standard Cleaning, Total Cleaning, and Service Packs
DISM (Deployment Image Servicing and Management) offers fine control Regarding the component store. The basic operation in a running system is:
Dism.exe /Online /Cleanup-Image /StartComponentCleanup
This command removes superseded versions of components without waiting 30 days and without the one-hour limit. It is usually the first pass recommended if you are looking for reasonable and reversible savings.
If your system is stable, you don't plan to uninstall updates, and you want to maximize your performance, there's an option to "freeze" the component base, removing all replaced versions so they can't be rolled back. The equivalent command is:
Dism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase
Important warning: after using /ResetBase You won't be able to uninstall updates that have already been installed. This is safe if you're willing to compromise on that and are interested in minimizing storage space, but it's not ideal for computers where you might need to revert to a previous version.
Additionally, for older installations with Service Packs (especially classic Windows 7/Server), you can retrieve the backup files that allow you to uninstall that SP with:
Dism.exe /Online /Cleanup-Image /SPSuperseded
As with /ResetBase, you lose the option to uninstall the Service Pack here. In Windows 10/11, the packages are cumulative, so This approach makes less sense except in very specific cases or inherited images.
Disk Cleanup: Graphical Interface and Categories
If you prefer a familiar interface, the Disk Cleanup It allows you to delete temporary files and, when run with administrator privileges, clean system files, including the category of Windows Update which affects the size of the component warehouse.
To open it, press Windows + R, type “cleanmgr” and confirm. First you will see Temporary files To clean up common system components, click "Clean up system files." After the scan, select categories such as "Windows Update," "Downloaded Program Files," or registry entries, as applicable, and confirm with OK. It's a simple alternative if you don't get along with the console.
Be patient: cleanup processes can take anywhere from minutes to hours depending on the size of the storage, the type of disk, and pending tasks. Sometimes space is freed up after a restart, and you won't see the change reflected until the system completes. internal operations.
Check and measure: useful commands before and after
It's a good idea to measure before and after to see if you've actually gained space. In addition to the DISM analysis, you can check the date of the last maintenance and whether a new cleanup is recommended using the same analysis command. Repeat the analysis after each action. to verify the effect:
Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore
If the report indicates “Number of recoverable packages: 0” or “Cache and temporary data: 0 bytes” and does not recommend cleanup, it's normal that you won't gain any space with StartComponentCleanup. In that case, Your warehouse is probably already optimized. and the rest is shared with Windows (not reducible) or essential copies.
Why does it sometimes not download a single byte? (and what can you do?)
It's a common situation: you run “/StartComponentCleanup” or even “/ResetBase” and the visible size doesn't change. There are several typical causes. First, because a large part of the volume is “Shared with Windows”, not removable without breaking the systemSecond, because there are no recoverable packages or cache to clear. Third, because the Explorer counts hard links and the "Size" appears larger than it actually is.
Some practical tips if you want to be extra careful: run “/StartComponentCleanup /ResetBase” only if you are not going to revert updates; restart and measure again with DISM; make sure there are no installations or pending updates (Windows Update) that blocks the cleanup; and leave the computer on so the scheduled task can work in sleep mode. It's also advisable to keep your version's Servicing Stack updated, as this affects maintenance.
Seeing thousands of subfolders (15.000 or 16.000) isn't a problem in itself: the cache maintains a structure by packages and versions, and many of those items are hard links. If "Cache and temporary data" is 0, there's almost no junk; Do not attempt to delete subfolders manuallybecause you will put the system at risk.
Finally, remember that Task Scheduler has a 30-day wait for new versions and a 1-hour limit when it runs automatically. Forcing a release with DISM eliminates this wait and time limit, which usually results in a more immediate release. Choose the method according to your urgency and your risk tolerance of not being able to uninstall patches.
Guided steps: Open CMD as admin and run DISM
If you've never used DISM, the Boot It's simple. Open the search bar, type "CMD", right-click, and select "Run as administrator". With the console elevated, you can scan and clean with the commands above. Without administrator privileges DISM will not be able to operate on the warehouse.
A recommended sequence would be: 1) analyze with “/AnalyzeComponentStore”; 2) if there are recoverable packages, run “/StartComponentCleanup”; 3) if you are looking for maximum savings and do not need to revert, add “/ResetBase”. Measure after each step to assess whether it's worth going to the next one.
Checking the size in Explorer (and why it's misleading)
If you want to take a closer look, you can see the "apparent size" of the folder by making hidden items visible (in the Explorer ribbon, View tab) and opening the properties of C:\Windows\WinSxSYou will see “Size” and “Size on disk”, which They do not match DISM's "Actual Size" due to hard links. Use this view as a general guideline, not as an actual savings metric.
On systems with many updates since their first use, it is common for the first cleanup with DISM to reduce the storage by around 15-20% (reported cases), but every system is different. Your savings will depend of the number of packages replaced and how much remains recoverable.
Extra action to gain space: C:\Windows\Installer folder (advanced)
Folder C:\Windows\Installer It contains MSI installer cache and patches necessary to repair or uninstall software. Deleting it indiscriminately is a bad idea. However, there is an advanced procedure to reduce the size of the PatchCache by modifying a policy and deleting the cache directory. Use it only if you know what you're doing. and after creating a backup/restore.
The typical steps (in CMD (with administrator privileges) stop the Windows Installer service, adjust the MaxPatchCacheSize registry key, They delete the cache directory and restore a default value. The command sequence would look something like this:
Net Stop msiserver /Y
Reg Add HKLM\Software\Policies\Microsoft\Windows\Installer /v MaxPatchCacheSize /t REG_DWORD /d 0 /f
RmDir /q /s %WINDIR%\Installer\$PatchCache$
Net Start msiserver /Y
Net Stop msiserver /Y
Reg Add HKLM\Software\Policies\Microsoft\Windows\Installer /v MaxPatchCacheSize /t REG_DWORD /d 10 /f
Net Start msiserver /Y
This process can free up several gigabytes on machines with a lot of software installed, but, we repeat, may affect repairs or removals de appsIf you're not comfortable with it, don't apply it and focus on cleaning WinSxS with official tools.
Maintenance in offline images
If you prepare "reference" images for deployments, it's advisable to clean the component store before capturing them. DISM allows you to work on a mounted image (for example, in D:\Mount) using the /Image switch. This reduces the base size which then inherit all the facilities.
Dism.exe /Image:D:\Mount /Cleanup-Image /StartComponentCleanup
Dism.exe /Image:D:\Mount /Cleanup-Image /StartComponentCleanup /ResetBase
The same warnings apply: `/ResetBase` will not revert updates to that image. Use it at the end of the preparation process, once you are certain of its stability and the included patches. It is a recommended practice in corporate environments to save bandwidth and space.
Understanding what WinSxS really is and how Windows measures its size makes cleanup no longer a leap into the unknown. Between Task Scheduler, DISM, and Disk Cleanup, you have all the tools you need to reduce gigabytes without compromising stability. If the analysis indicates no savings, it's not a bug: This means your warehouse is already adjusted.In advanced environments, cleaning offline images and, with great caution, working on the Installer folder can free up extra space when it's really needed.

Passionate writer about the world of bytes and technology in general. I love sharing my knowledge through writing, and that's what I'll do on this blog, show you all the most interesting things about gadgets, software, hardware, tech trends, and more. My goal is to help you navigate the digital world in a simple and entertaining way.