I know I am little late with a potential solution but I too had this problem but I managed to get disk cleanup to work after trying lots of different things but more on that later:
Try this fix first:
- Press Win + R on the keyboard to open the run dialog.
- Type in "OptionalFeatures.exe" and press OK.
- Make sure ".NET Framework 3.5" is checked or has a - in the box as in the screenshot:
- If ".NET Framework 3.5" is not installed check the box and click OK.
- Reboot the computer when it has finished installing and try running the disk cleanup again.
- Also run Windows Update to make sure all the .NET Framework updates are current.
Long explanation of how I came to this conclusion and possible not recommended alternative solution:
I was trying to fix this problem on my pc for ages trying various disk cleanup DISM and SFC commands and I finally managed to get disk cleanup to clean windows updates by running all these command lines (from an administrator prompt) whilst booted into "Safe Mode with Networking" but I have no idea which one actually "solved" it:
- DISM /Online /Cleanup-Image /RestoreHealth
- sfc /scannow
- DISM /Online /Cleanup-Image /StartComponentCleanup /ResetBase
- DISM /Online /Cleanup-Image /spsuperseded /hidesp
After that I ran disk cleanup two more times whilst still in safe mode to make sure that it had worked and it had finally cleaned those pesky updates!
However, when I rebooted back into normal mode, I found that half of my programs wouldn't start anymore and would give errors (I can't remember what the errors said).
I think the problem was that update cleanup was trying to remove some versions of .NET Framework even it was still in use by running programs!
Anyway I fixed this new self inflicted problem by turning on ".NET Framework 3.5" and running Windows Update which made everything work again.