Skip to content

Reclaim space from old updates (WinSxS cleanup) — via Microsoft Learn

Commandmedium riskNeeds adminWindows 11Windows 10

Old versions of updated components pile up in the WinSxS folder. A DISM command removes superseded versions now instead of waiting for Windows' own scheduled cleanup. Never delete WinSxS files by hand — that can break Windows.

Takes effect right away

The easy way

  1. The easy way: run Disk Cleanup → Clean up system files → tick Windows Update Cleanup.

Command

Run in an administrator Command Prompt / Terminal window.

Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore
Dism.exe /Online /Cleanup-Image /StartComponentCleanup

Undo

rem Not reversible: removed old component versions can't be restored (future updates are unaffected).
Adding /ResetBase squeezes out more space but means updates installed so far can no longer be uninstalled — only use it when the PC is stable. Windows also runs this cleanup itself via the \Microsoft\Windows\Servicing\StartComponentCleanup scheduled task.

Sources

Source reviewed
2026-11-02
Link checked
2026-11-02
Tested hands-on
Not by Oddbyte.Me

Oddbyte.Me hasn't tried this on every Windows build, so keep the undo handy.

winsxsdisk spacedismcomponent storeupdate cleanup

More in Windows Update