Clean Up WinSxS Folder

The Windows Component Store (WinSxS) directory can grow significantly over time as Windows installs updates. This script uses the Deployment Image Servicing and Management (DISM) tool to forcefully clean up this folder, removing old and superseded component versions.

Download

WinSxS Optimization Script

A script that runs DISM cleanup commands with the ResetBase flag.

Warning: This script uses the /ResetBase flag. This removes all superseded versions of every component in the component store. You will not be able to uninstall any existing Windows updates after running this. Future updates will still work normally.

How to Use

  1. Download: Save the script from the link above.
  2. Run as Administrator: Right-click the .bat file and choose "Run as administrator". DISM requires elevated privileges.
  3. Wait: The process may take several minutes depending on your system speed and the size of the WinSxS folder.