Cleanup WinSxS

Anyone with a Windows 2008 Server over a year old has likely run into this problem. Your C:\ drive slowly runs out of space, when you check where all the space is going you find C:\Windows\WinSxS is using 10 – 20GB. I’m not going to go into what the folder is used for or why Microsoft originally made it not possible to clean this up, you can read the Microsoft Support KB for more info.

Here are the steps I’ve been using to successfully cleanup winsxs:

  1. Make sure you have the latest Service Pack for Windows 2008 R2, early on the DISM tool did not have this option.
  2. Open a Cmd Prompt as Administrator
  3. Make sure you have the 64-bit Cmd Prompt open, see below for explanation.
  4. Run the following command: C:\Windows\System32\DISM.exe /online /Cleanup-Image /SpSuperseded Cleanup WinSxS
  5. You should clean up several GB of files.

Error 11

If you get the following error:
DISM Error

Error: 11

You cannot service a running 64-bit operating system with a 32-bit version of DISM. Please use the version of DISM that corresponds to your computer’s architecture.

This means your somehow running the 32-bit Command Prompt. Run the following to load 64-bit cmd.exe:

Now run DISM as normal.


My New Stories

March 2016 Web Hosting Deals
Powershell AD Group Management
Troubleshooting 403