Go to ...

RSS Feed

Toolkit Item: PatchCleaner


Here’s the next, somewhat overdue installment in our Admin Toolkit series. In this series, we examine useful software tools likely to appeal to Windows admins and power users. This time around, the tool is called PatchCleaner. It’s technically “donation-ware.” That means PatchCleaner is free, but those who use and like the program are encouraged to donate to its makers to help with maintenance and enhancement costs. Kari and I have given them $5 to help with this and encourage others who use the program repeatedly to do likewise.

About PatchCleaner’s Makers: homdev.com.au

HomeDev is a software consulting firm based in Sydney, Australia. The company’s primary focus is on serving the legal industry, to which they provide expertise on InterAction CRM, custom software development, and SQL server expertise in the areas of data warehousing, integration, and the Report Builder authoring environment (SSRS). Obviously, the HomeDev developers have delved a bit into Windows OS internals as well, as should be obvious from the focus and capabilities found in PatchCleaner itself.

What Is Toolkit Item: PatchCleaner?

As applications get installed and then updated in the Windows environment — including 3rd party software as well as built-in OS components — the hidden C:\Windows\Installer folder plays host to an ever-increasing number of Microsoft installer (.MSI) and Microsoft path (.MSP) files. These files may be used when applications are installed, patched, or uninstalled. As the program’s online documentation reads: “If you blanketly delete all the files in this folder, you will find yourself needing to rebuild windows.” At the same time, as patches get added to an installed image, the files in this folder become outdated (replaced by newer versions). They might also become orphaned (no longer referenced in any installed applications) as well. Thus, they aren’t needed any more, yet they can consume hundreds of megabytes to gigabytes of disk space.

Simply put, PatchCleaner checks the contents of C:\Windows\Installer and flags duplicate or orphaned files. You can elect to move such files to another location, or to delete them outright. The HomeDev developers recommend — and we concur — that it’s safest to move those files to another drive. That’s because it’s possible that PatchCleaner might flag something that actually turns out to be needed during a future patch or uninstall. Should that occur, the copy can be restored to the C:\Windows\Installer folder and the failed operation, when repeated, should then proceed unimpeded.

Using HomeDev PatchCleaner

After all this explanation, using the program is decidedly anticlimactic. After downloading and installing it, run it by typing “PatchCleaner” into the search box, launching it from the Start menu, or whatever other means works best for you. After being launched, the program walks through a 5-step process before it reports on orphaned files. First it compiles a list of all the files it finds in the folder, then it determines which ones are referenced in the runtime environment, then it applies a set of filters for installed applications, and finally produces a list of orphaned files that may be moved or deleted. The results look like this:

I keep my PCs pretty clean, so there are only 4 orphaned files. I’ve seen other systems with hundreds, occupying 4-6 GB of disk space.

By default, PatchCleaner creates a folder inside C:\Users\<logged-in user>\Documents named PatchCleanerBackup. Because my goal in running the program is to reduce Windows’ on-disk footprint, I usually relocate it to a different drive. If you right-click PatchCleaner.exe to run the program, you’ll find no “Run as administrator” for this program. That’s because it runs at high privilege by default, given it’s job is to delete hidden, system files. You can click either of the two blue details… links shown in the program window above. The first produces a list of all the files in  C:\Windows\Installer that are still in use; the second a list of orphaned files in that same directory.

Moving or deleting these files is as simple as choosing the “Delete” or “Move” buttons shown in the screen cap, respectively. I routinely back up my systems nightly, so I have no qualms about picking delete myself. That’s because I can always return to the backup from the day before if needs must. But for general safety and easy recovery, I’ve designated E:\PC-MoveFiles as the target directory on the machine where the screencap was made.

PatchCleaner is a great tool with a narrow focus. It’s the kind of thing you’ll get a big bang from the first time you use it, but a much smaller bang thereafter. Nonetheless, it’s a worthwhile element in an admin’s or power user’s toolbox because it helps to whittle Windows down to a smaller disk footprint.

Author: Ed Tittel

Ed Tittel is a 30-plus-year computer industry veteran. He’s a Princeton and multiple University of Texas graduate who’s worked in IT since 1981 when he started his first programming job. Over the past three decades he’s also worked as a manager, technical evangelist, consultant, trainer, and an expert witness. See his professional bio for all the details.

Leave a Reply

This website stores some user agent data. These data are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to opt-out of any future tracking, a cookie will be set up in your browser to remember this choice for one year. I Agree, Deny
558