We help IT Professionals succeed at work.

DISM Start component cleanup

im running windows 2008 r2 and winsxs utilizing the whole diskspace, wen google and saw some option via using dism.exe - Dism.exe /online /Cleanup-Image /StartComponentCleanup

But i getting error - The startcomponentcleanup option is not recognized in this context.
How may i enable this option to shrink winsxs folder
Comment
Watch Question

Hello ThereSystem Administrator
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
/StartComponentCleanup is available on Windows 8 and later or Windows Server 2012 and later.

You can try to use this instead. It will remove all installed files that got replaced by the latest SP.
dism.exe /online /cleanup-image /spsuperseded
Doodad BoySupprt

Author

Commented:
hi,
i used the option  /spsuperseded, but i getting an output "Service PAck Cleanup cant proceed. No Service pack backup files were found"
Hello ThereSystem Administrator
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
You can install the Desktop Experience feature and run Disk Cleanup.
Doodad BoySupprt

Author

Commented:
hi, i used diskcleanup, but it showing all 0 size, nothing is there to be deleted
Hello ThereSystem Administrator
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
It seems to be fine then.

What do you need to accomplish? Free up the C:\ drive? Something else?
Doodad BoySupprt

Author

Commented:
yep, free up c:\drive
System Administrator
CERTIFIED EXPERT
Distinguished Expert 2018
Commented:
What's the size of the disk? Is it a VM or a physical server?

Check C:\Windows\Temp and C:\Windows\Logs for any leftover files.

There are a few more locations you can check and possibly delete:
C:\Users\ - delete an old user folders
C:\Windows\Software Distribution - stop Windows update service and delete the folder
C:\ProgramData\Microsoft\Windows\WER - delete Windows error log files