Windows 7 Disk Cleanup deleted 30GB of temp files but only recovered 10GB of disk space?

Windows 7 was reporting I had 9.49 GB space free on my primary C: (SSD) drive:

9.49GB free on C: drive

Windows Disk Cleanup reported I had 28.1 GB of "Temporary files" that could be deleted to get this space back (together with 206 MB of "Temporary Internet Files" and 154 MB of "Thumbnails" gives the 28.5 GB "Total" in the screenshot below).

28.1 GB of "Temporary files"

I proceeded with the "Disk Cleanup" (logged in as an Administrator user). However, even after rebooting, the recovered space is only about 10 GB:

19.9GB free on C: drive

What's happened to the other 18+ GB? Checking "Disk Cleanup" again, now shows "Temporary files - 0 bytes" - so the files do appear to have been deleted - but why haven't I gained the amount of disk space I was promised?

No "Temporary files" remain


UPDATE: After some digging, a number of other questions/sources seem to suggest that the amount of freeable space by Disk Cleanup is, at times, grossly overestimated?! For example:

  • Windows Disk Cleanup reports I could save 357GB on a 256GB drive?

Although, I did not first (manually) check the reported disk usage for the various locations Disk Cleanup uses when calculating the amount of "Temporary files", so I cannot confirm this.


Solution 1:

Chances are good the system is in fact retaining data in the form of shadow copies (system restore points). Shadow copies are basically snapshots of the contents of the disk at specific points in time, from which data can be restored. Because of the way they work, the temporary data may be retained in a shadow copy even if you delete the files from the filesystem. You'll need to delete these shadow copies to free up space.

If you don't mind losing restore points, you can run the following command in an elevated command prompt to delete all shadow copies on the system volume:

vssadmin Delete Shadows /For=C:

If you'd like to reduce the amount of space used for shadow copies, you can set the maximum amount of space the system will use by running the following command, again in an elevated prompt:

vssadmin Resize ShadowStorage /For=C: /On=C: /MaxSize=<size>

The size can be a value ending in a suffix like MB or GB (e.g. 4GB) or a percentage of the volume size (e.g. 5%). Older shadow copies will be automatically deleted if necessary to fit within the specified amount of space.