While certain areas of the Windows file structure may be off-limits to direct action — most notably, deleting files inside the C:\Windows (or %windir%) folder — that doesn’t mean that savvy Windows admins and power users can’t selectively prune excess or obsolete files. You just need the right tools.
That provides the subject for this article, in fact, as I explain how two different utilities — one built into Windows, the other from a third party — can help clean out old, obsolete, or orphaned files in the OS itself.
Utility 1: PatchCleaner
Like most Windows admins, I keep a careful eye on disk space consumption for the system/boot drive. During my most recent round of “space checks,” I noticed that one of my Windows machines had a much bigger %Windir%\Installer folder than any of my other machines. When I say “much bigger,” I’m talking about 36.5 GB as compared to something between 1 and 2 GB on the seven other Windows 10 PCs under my administration.
I couldn’t help but wonder how this could happen, so I started doing a little research. What I learned is that this folder is where Windows stashes installer (.msi) files and patches (.msp files) for applications. Those applications include built-in Windows utilities and facilities in great profusion. These files hang around because they may be used again when updating, patching or uninstalling Windows applications in the future. That’s why it’s not recommended to jump into the folder to start deleting stuff, because you don’t know what may or may not be needed again. Woe betide those who try anyway, because willy-nilly removals can result in a non-functional OS.
But over time, as the OS is patched repeatedly, installer files can become outdated or orphaned. Either way, this means they can unnecessarily consume great quantities of disk space. But deciding what to delete requires working through the manifest of files in the \Installer directory and uncovering which of them are tied to current, active applications. What’s left over, by extension, is what’s orphaned (and for applications for which newer versions are also present in the same directory, this includes obsolete installer and patch files as well).
Thinking through the install history of the machine with the huge \Installer folder, I realized it’s the only one I have that has been upgraded from 7 to 8 to 8.1 to 10 without ever having been through a clean OS install along the way. Thus, it’s had ample opportunity for the \Installer directory to mushroom dramatically over the years it’s been in operation. That also explains why the dates on some of the files in that folder went all the way back to 2013!
After casting about for inspiration on how to deal with this oversupply of \Installer files, I appealed to the community on TenForums.com for insight. One of its fellow members suggested a free utility named PatchCleaner from Australian software company homedev.com.au. After running it on the over-stuffed PC, the size of the \Installer folder was reduced from 36.5 GB to a relatively svelte 6.4 GB. That’s a disk savings of 30.1 GB, which counts as a worthwhile, if not whopping, footprint reduction in my book.
PatchCleaner is extraordinarily conservative in its approach to pruning files. Rather than deleting them outright (which it will do if you click the “Delete” button), it recommends moving files to a different folder instead (the “Move” button). Then, if anything comes up missing or broken, you should be able to replace the missing files and keep going without missing a beat. I elected not to take that option because I keep three or more years’ worth of backups around at no more than monthly intervals.
PatchCleaner is a great and simple utility. If your \Installer directory grows beyond 5 GB or so, it’s worth downloading and applying to your OS files.
Utility 2: Disk Cleanup
Windows 10 has been subject to a raft of cumulative updates since the Anniversary Update went live on August 2, 2016. In fact, I count nine updates on Microsoft’s Windows 10 update history page: two in October, three in September, and four in August. That most assuredly accounts for a new element in the Disk Cleanup (a.k.a. cleanmgr.exe) routine after choosing the “Clean up system files” button — namely “Windows Update Cleanup.” Here’s what popped up in that interface after the August and September cumulative updates had come and gone on my systems:
All you need to do is check the box next to “Windows Update Cleanup” to root out outdated leftovers from recent Windows Update downloads. From the looks of this screen capture, this should probably become a monthly ritual, thanks to the size and frequency of the Cumulative Updates for Windows 10 Current Branch (Version 1607) installations.
Warning! Even though the on-disk size is not enormous, it can still take Disk Cleanup quite a while to root out all the files involved. That’s because these files may be linked to multiple locations on disk and must be carefully disentangled from the file system. This particular clean-up took about ten minutes, in fact.
A clean Windows is a happy Windows
Be sure to add these items to your disk clean-up repertoire to help keep Windows from ballooning out of control. For other stories in this same vein, please see “Windows 10 post-upgrade cleanup tips,” “Why DISM is the Swiss Army Knife of Windows 10 maintenance” and “How to reduce unnecessary drivers in Windows 10.”