Purge stale shadow copy data in Windows Vista

diskspace.gif

Some versions of Windows Vista comes with Volume Shadow Copy, a souped up version of the system restore function of Windows XP. Now, not only registry and core files are restored but any file on a protected drive can be restored to an earlier point in time.

If this feature is enabled on a drive, Windows Vista sets aside a significant amount of disk space to keep the old copies. Supposedly this space can be reclaimed by using the Disk Cleanup feature. I had partitioned my hard drive and installed Windows Vista. When reinstalling Windows Vista I only reformatted my system drive and later noticed that a large amount of disk space was not accounted for when adding the sizes of all folders on the drive.

It turned out that Volume Shadow Copy was not enabled on my data drive after the reinstallation, but the data was kept from the previous installation and just wouldn't go away. To see the shadow storage I opened a console as administrator and typed 'vssadmin list shadowstorage'. I enabled Volume Shadow Copy on the data drive and ran the Disk Cleanup, before I disabled Volume Shadow Copy. No luck.

From what I have been able to tell, the Disk Cleanup feature does not work in this case. When I did the same thing but instead of the Disk Cleanup function issued the following command (still in the administrator console) it worked:

vssadmin resize shadowstorage /For=D: /On=D: /MaxSize=300MB