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:
- Make sure you have the latest Service Pack for Windows 2008 R2, early on the DISM tool did not have this option.
- Open a Cmd Prompt as Administrator
- Make sure you have the 64-bit Cmd Prompt open, see below for explanation.
- Run the following command: C:\Windows\System32\DISM.exe /online /Cleanup-Image /SpSuperseded
- You should clean up several GB of files.
If you get the following error:
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.