Cleaning up WinSxs folder on Windows 2012 R2 or Windows 8.1

To clean up windows component store (C:\Windows\WinSxS).

  1. Open up PowerShell
  2. To check if there is any component registry is corrupted. “dism /Online /Cleanup-Image /CheckHealth”
  3. If this returns error, try to do this to fix “dism /Online /Cleanup-Image /RestoreHealth” and Reboot your computer
  4. To check if windows component store can be cleaned up “dism.exe /online /Cleanup-Image /AnalyzeComponentStore”
  5. To remove all superseded version in the component store “dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase”
  6. To further clean up space, you can also remove all the backup components needed for deinstallation of the service pack “dism.exe /online /Cleanup-Image /SPSuperseded”

 

 

Leave a Reply