Cleaning up disk space

Cleaning up disk space by deleteing old Windows Updates was more easy on Windows XP than Win7 now. Updates are stored under the “%windir%\winsxs” folder, where you should not delete anything if you love your stable operating system.

A colleague just told me he found the trick to cleanup those updates, it’s just starting the following command under Win7 / Server 2008r2:

dism /online /cleanup-image /spsuperseded

This command cleans up the %windir%\winsxs folder which holds (among others) files for Service Packs. The only drawback to this procedure is that once executed you won’t be able to uninstall the Service Pack(s) any longer – so use it cautiously and at your own risk.

— edit 05-Nov-2012

Windows Vista and Server 2008 (r1) do not have dism included. To cleanup WinSxs there you can use “compcln.exe” instead, it removes all Service Pack files. Take care, you’ll not be able to downgrade from SP2 to SP1 after running this command.

— edit May-2014

There is an update from Microsoft available (KB2852386) that makes the Windows’ Cleanup Diskspace Feature able to cleanup WinSXS Folder files. Just install the update and follow the instructions in the KB Article.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s