Disk cleanup is one Windows admin topic to which I return from time in this blog. Usually, that means jumping onto storage volumes and rooting out unwanted, unneeded, or unnecessary files and folders. Today, thanks to German programming whiz Uwe Sieber, I’m going to come at this from a different angle. His terrific tool, Drive Cleanup v1.4 tackles stale device entries, and removes them from the device tree shown in Device Manager. It also removes orphaned items from the registry for those same devices, when they’re no longer used. And that, dear Reader, is how DriveCleanup clears stale Win10 storage metadata. In so doing, it offers a cleaner, more accurate view of what’s in (and on) your systems.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
When DriveCleanup Clears Stale Win10 Storage Metadata, What Does That Mean?
A few examples will help explain this in real-world terms. Before using the tool, check Device Manager (with Show Hidden Devices checked). On my production PC, it lists 53 entries named “Generic volume shadow copy” under the “Storage volume shadow copies” item. Of that 53, 16 are greyed-out, which means they’re inaccessible. Likewise, my “Universal Serial Bus controllers” entry lists 9 “USB Composite Device” entries, of which 7 are greyed-out. The “USB Mass Storage Device” count is at 13, of which 11 are greyed-out. Lots of stale or inaccessible stuff. In fact, Drive Cleanup –run at the command line — summarizes what could be removed at the end of its output listing when run in “Test” mode. Here’s what it says about my production PC:
When run in test mode, Drive Cleanup reports on what it could clean up if instructed to do so.
Thus, I can see from the summary that Drive Cleanup can do more than remove the 11 USB devices I determined myself from inspection of Device Manager. It can also remove 22 disk devices, 3 CD-ROM devices, and 73 (!) storage volumes of one kind or another (most of which will be volume shadow copies). It will also remove 117 stale registry entries, more than the sum of all devices involved.
Using DriveCleanup Couldn’t Be Easier
All the details of what is to be removed appear in test output from Drive Cleanup for those curious to see what it can root out on their systems. You can pipe that output to a file (it’s too big to look at in the CLI) like so:
drivecleanup -t > dc-output.txt
Note: dc-output.txt is the name of the file to which the output will be written, and it will be stored in whatever disk directory the command is run from/in. Looking that stuff over, I can see entries for lots of USB flash drives not currently plugged in. I can also see a whole lotta entries labeled “VOLUMESNAPSHOT” which is where volume shadow copies come into play.
To run the actual cleanup, simply run the command with no parameter and it will root out all the items that Test mode finds. You can also selectively remove devices by type using various 1-letter abbreviations as parameters (for example “-R” cleans up Registry entries, “-U” USB entries, and so forth). Download and use this tool, and DriveCleanup clears stale Win10 storage metadata from your PC, too!
[Shout out to user jumanji at TenForums.com for bringing Sieber’s excellent Drive Tools for Windows suite to my attention in the post entitled “Not recognizing any USB devices” on 7/4/17. Thanks!]