Thursday, June 7, 2012

Can I delete c:\windows\winsxs

q: We discovered a folder under windows that is taking up 12GB c:\windows\winsxs can we delete it?
a: The generally accepted answer is NO.  However, we discovered a command that should free up some space within it.
  1. Open a Command-Line prompt with elevated privileges  (CMD - Run as administrator)
  2. From the default path of c:\windows\system32> run the following command
  3. dism /online /cleanup-image /spsuperseded
  4. We ran this on two Windows 7 computers and the c:\windows\winsxs folder was reduced by 4-7GB
NOTE: Obviously you'll want to make sure you never need to uninstall the most recent service pack, as well as have a current backup of your system.  Here's a link to an article about it.

UPDATE: If the device is Server 2008 R2 DISM works great, if the Server 2008 is Pre-R2 you'll have to run c:\windows\system32\compcln.exe.  This command reduced a 15GB winsxs folder to 13GB.

1 comment:

  1. Microsoft's suggestion is to leave that structure alone. The provided command is the only method we use to remove some content from that folder structure. Sorry.