cleanmgr.exe not removing 10GB of update files

cleanmgr.exe not removing 10GB of update files

Postby nanananapatchman » 01.03.2019, 01:28

Hello all,
I'm trying to make windows operating system images of the golden variety for vmware horizon view daas and vmware esxi. I find that if I just do updates with the native windows update client, I can then use cleanmgr.exe and delete the installation files used for the updates and free up about 10 GB of space which keeps my images nice and small. However, when I use wsusofflineupdate, for some reason cleanmgr.exe does not find the update files and my images end up being 10 GB larger than they need to be.

Is there a way to fix this or has this possibly been fixed in the latest build / beta version? I'd also be fine using ccleaner to remove the 10 GB of patch install files if that would work. Also, a slipstream of the patches into an image iso would help somewhat, but I would still get the unwanted 10 GB over time. Is this a know bug or is there something I can do about it?
Should I just delete the WinSXS folder and see what happens? :mrgreen:

Thanks for the help!

Antworte auf Deutsch sind auch wilkommen, fall es einfacher ist.
- Airman
Posts: 1
Joined: 01.03.2019, 01:14

Re: cleanmgr.exe not removing 10GB of update files

Postby Dalai » 01.03.2019, 02:20

Well, first of all, the updates installed by WSUS Offline are mostly CABs while (almost) all updates installed by Windows Update are MSUs (which contain the CABs within themselves). The consequence is that the Windows Update History (where only MSU updates are shown) appears to be almost empty when using WSUS Offline, but they appear in the list of Installed Updates (where all updates are shown). Just wanted to mention that (again).

I can't speak too much about the issue you're experiencing because I haven't used cleanmgr often enough to clean old Windows Updates. Maybe it depends on the Windows version?

One thing I learned in the last couple of days* is that old Windows Updates and the WinSxS directory can be cleaned up with DISM:
Code: Select all
dism.exe /Online /Cleanup-Image /StartComponentCleanup
Note that this doesn't work on Win7 (AFAIK) but only on Win8 and higher and it WILL take time. The server I used this command on was done two hours later, which is almost double the time it took to install Windows Updates via WSUS Offline!

There are also some other options as detailed in this thread.

*) The tool cleanmgr.exe is not installed by default on Windows Server 2012 R2. To be able to use it, Desktop Experience feature would have to be installed which also installs the hand-writing services crap and other features that just don't belong on a server system. Yay, MS, good job... NOT!

Posts: 1025
Joined: 12.07.2016, 21:00

Re: cleanmgr.exe not removing 10GB of update files

Postby boco » 01.03.2019, 04:39

Please note that cleanmgr.exe is deprecated and might vanish in the future (Windows 10). Storage spaces should be used instead.
Microsoft update catalog:
Windows Install media download:
Posts: 2332
Joined: 24.11.2009, 17:00
Location: Germany

Return to Installation / Updating

Who is online

Users browsing this forum: No registered users and 15 guests