Skip to contentGo to the directory tree
  1. C:
  2. Windows
  3. WinSxS
FolderRisk: Do not touch

WinSxS C:\Windows\WinSxS

WinSxS: the Windows component store, holding system file versions for installing, repairing and updating. Never empty it by hand.

Updated on By AltF4 Formation

What it’s for

WinSxS is the Windows component store. It keeps the versions of system files needed for installation, repair, rollback and updates, and lets several versions of the same component live side by side. It is the source for DISM /RestoreHealth and sfc /scannow when a system file is damaged.

What it contains

  • System components and their manifests, in several versions.
  • Hard links to the files actually in use in System32 and elsewhere. File Explorer counts those files several times, so the size it shows is misleading. Dism /AnalyzeComponentStore gives the real size.
  • Previous versions of components, kept for a while to allow rollback.
  • A size that grows with updates and shrinks when the store is cleaned up.

Risks and best practices

  • Never delete its content by hand. Microsoft warns that deleting files from WinSxS, or the whole folder, can damage the system so badly that it no longer boots and can no longer be updated.
  • Windows shrinks the folder on its own. The StartComponentCleanup scheduled task waits at least 30 days after an updated component is installed before uninstalling its previous versions.
  • To reclaim space, run the DISM component store cleanup: it removes previous versions right away, without waiting the 30 days. Run an analysis first to see whether cleanup is recommended.
  • The /ResetBase option removes all superseded versions of every component, so already installed updates can no longer be uninstalled. Keep it for images you will never roll back.
  • On Windows Server, Uninstall-WindowsFeature -Remove also deletes the files of a feature you no longer need.

Useful commands

Fenêtre de terminal
# As administrator: analysis (read-only), with the real size and the cleanup recommendation
Dism /Online /Cleanup-Image /AnalyzeComponentStore
# As administrator: standard cleanup, removes previous versions without the 30-day wait
Dism /Online /Cleanup-Image /StartComponentCleanup
# As administrator: run the scheduled cleanup task (30-day wait respected, 1 hour maximum)
schtasks.exe /Run /TN "\Microsoft\Windows\Servicing\StartComponentCleanup"
# As administrator, irreversible for installed updates: do not run unless necessary
# Dism /Online /Cleanup-Image /StartComponentCleanup /ResetBase

Report a mistake