How to Use the DISM /Cleanup-Image /StartComponentCleanup Command in Windows 11 to Shrink the WinSxS Folder

When investigating declining disk space on your Windows 11 system drive (C:), running tree-size scanners often highlights a massive directory: C:\Windows\WinSxS (Windows Side-by-Side). Users frequently discover this folder consuming between 10GB and 25GB of storage. However, attempting to manually delete files inside WinSxS corrupts the Windows servicing subsystem, breaking future quality updates and leaving the operating system unbootable.

The only supported, safe method to shrink the WinSxS directory is using the native Deployment Image Servicing and Management (DISM) command-line tool with the /StartComponentCleanup parameter. This guide explains how the component store functions, how to analyse its true disk consumption, and how to execute safe cleanup operations.

Understanding the WinSxS Component Store

The WinSxS directory stores all Windows system components, hard links to active kernel drivers, and backup copies of system files replaced by monthly cumulative updates:

  • Hard Link Illusions: File Explorer reports exaggerated sizes for WinSxS because many files are hard links pointing to binaries in System32. Standard disk properties double-count these files.
  • Superseded Update Retention: When a new monthly cumulative update installs, Windows preserves the older update binaries so you can roll back if updates fail. Over time, these superseded components accumulate substantial storage.

Step-by-Step Component Store Cleanup

1. Launch an Elevated Terminal

Press Win + X on your keyboard and select Terminal (Admin) or PowerShell (Admin).

2. Analyse the True Component Store Size

Before purging components, determine how much storage is genuinely reclaimable:

dism /online /cleanup-image /analyzecomponentstore

DISM scans the component manifest and outputs key diagnostic metrics:

  • Actual Size of Component Store: The true physical footprint (excluding hard links).
  • Backups and Disabled Features: Space occupied by uninstalled payloads.
  • Component Store Cleanup Recommended: Reports Yes or No based on superseded component volume.

3. Execute Standard Component Cleanup

If cleanup is recommended, trigger the standard purging routine:

dism /online /cleanup-image /startcomponentcleanup

This command removes superseded component versions and compresses dormant components, safely recovering storage without disabling system restore features.

4. Advanced: Purging Superseded Updates with /ResetBase

If you require maximum disk recovery and your current Windows 11 installation is stable, purge all previous update rollback baselines:

dism /online /cleanup-image /startcomponentcleanup /resetbase

Important Warning: Adding /resetbase permanently deletes the rollback snapshots of all currently installed cumulative updates. You will be unable to uninstall existing updates if an issue arises later.

Comparison of Windows 11 Storage Management Utilities

Tool / Command Primary Target Safety Rating Typical Reclaimable Space
Storage Sense Temporary files, recycle bin, browser caches Safe 500MB – 5GB
cleanmgr /sageset Legacy delivery optimisation, previous Windows installs Safe 2GB – 15GB
DISM /StartComponentCleanup Superseded kernel binaries and WinSxS store Official & Safe 3GB – 12GB
Manual Deletion of WinSxS Direct file deletion in Explorer Extremely Dangerous (Corrupts OS) 0GB (Guaranteed crash)

Troubleshooting Common DISM Errors

  • Error 0x800f0806 (Pending Operations): Occurs if Windows Update has an uncompleted installation or pending reboot. Restart your computer fully and re-run DISM.
  • DISM Stalls at 20% or 100%: DISM decompressing and cataloguing thousands of hard links is I/O intensive on mechanical drives. Allow up to 15 minutes before cancelling.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.