Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Clean Up the WinSxS Folder to Free Disk Space

This guide shows you how to safely clean old files from the WinSxS folder on Windows. It can give you back some disk space.

Windows Hosting2 min read11 steps

What is the WinSxS folder?

WinSxS is a folder inside the Windows folder. Windows keeps copies of system files there. It uses them for updates, repairs and rolling back a bad update. The folder looks very big. Part of that size is only a display effect, because many files are links to other files.

Warning: Never delete files from the WinSxS folder by hand. This can break Windows so that it cannot start or update. Always use the tools below. Take a backup or a snapshot of your server first.

Steps with Disk Cleanup

  1. Click Start and type Disk Cleanup.
  2. Open it and pick the drive that holds Windows. This is usually drive C.
  3. Click Clean up system files. If asked, pick drive C again.
  4. Tick Windows Update Cleanup.
  5. Click OK, then confirm with Delete Files.
  6. Wait until it finishes. This can take some time.

On Windows Server, the Disk Cleanup tool may not be installed. Then use the commands below.

Steps with the command line

The command line is a black window where you type commands. DISM is a Windows tool that repairs and cleans the system image.

  1. Click Start and type cmd.
  2. Right-click Command Prompt and choose Run as administrator.
  3. First, ask Windows how big the store is:
    Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore
    This command shows the size and says if a cleanup is recommended.
  4. If a cleanup is recommended, run:
    Dism.exe /Online /Cleanup-Image /StartComponentCleanup
    This command removes old versions of update files that are no longer needed.
  5. Wait until you see a message that the operation completed.
Warning: Do not add the /ResetBase option unless you are sure. It makes installed updates impossible to uninstall.

Good to know

  • The space you gain is often small. Do not expect gigabytes every time.
  • Do not stop the command halfway.
  • Restart the server after a big cleanup if Windows asks you to.

Quick recap

  • WinSxS holds system files that Windows needs. Do not delete them by hand.
  • Use Disk Cleanup and choose Windows Update Cleanup.
  • Or run the DISM analyze and cleanup commands as administrator.
  • Make a backup first.