PatchCleaner: remove orphan Windows installer files to free up disk space
PatchCleaner is a free program for the Windows operating system that can free up huge amounts of disk space by cleaning up the Windows Installer Directory.
The Microsoft Windows operating system stores installer and patch files in a hidden directory on the Windows partition.
The directory c:\Windows\Installer is a protected system folder that becomes only visible if you disable the "hide protected operating system files (Recommended)" option in the Folder options.
It lists installer files (msi) and patch files (msp) in the directory directly and in directories. Some of these files are required during updates or removals and should not be deleted while others may be orphaned and no longer of use.
Depending on the age of the system, these orphaned files may take up a considerable amount of space (the most I have seen is 17 Gigabyte).
While it is possible to clean these files manually, by determining whether files in the Windows Installer folder are still registered on the system or not.
Several programs have been created to automate the process, and while they work fine most of the time, it is highly suggested to create a full backup of the system partition before any Installer files are removed from the directory.
PatchCleaner is a free program for Windows that automates the process. It requires the Microsoft .NET Framework 4 and is only compatible with Windows 7 and newer versions of Windows. Please note that some antivirus solutions may flag it as malicious but that is a false positive.
The windows operating system holds a list of current installersÂ and patches, that can be accessed via WMI calls, (Windows Management Instrumentation ).
PatchCleaner obtains this list of the known msi/msp files and compares that against all the msi/msp files that are found in the c:\Windows\Installer directory. Anything that is in the folder but not on the windows provided list is considered anÂ orphaned file and is tagged to be moved or deleted
The program requires to be installed and displays the following interface when run on the system (it appears to create no start menu entry, you find it listed under C:\Program Files (x86)\HomeDev if c: is the main partition of the system.
PatchCleaner displays the files in the Installer directory that are still in use, and the orphaned files. The size of the orphaned files is displayed by the program as well.
While you can delete those orphaned files right away with a click on the "delete" button, you may want to move them instead.
This is a precaution that you may want to take as it allows you to move files back should they be required after all. If you delete the files without backup, you may run into serious update issues on the system that are not easy to fix.
The newest version of PatchCleaner can be run from the command line as well.Â Use /d to delete found orphaned files, or /m [FilePath] to move them instead.
PatchCleaner can free up a considerable amount of disk space by removing orphaned installer files from Windows.
It worked without issues during tests, and while that is the case, it is highly recommended to move the files first to a backup location using the program before you delete them. You can move them a Flash drive for instance and delete them once you are certain they are no longer needed.
If you want to be 100% sure nothing bad happens, create a system backup so that you can restore it when the need arises.
Is this something like MSIZap?
Yes that is right.
Just try IObit
I had 4 orphan files. I said delete. It said “are you sure?”. I said “no”. Then I chose ‘move’. Looking in the path the files were supposed to be, the folder was empty.
Strange, have you checked in the Installer folder whether the files are still in it?
Sorry, I see the files *are* in the ‘move to’ folder. Must have been my file explorer not refreshing.
Good you clarified this. Would be a serious bug.
Good article Martin, i came across this program last month and haven’t had any problems since removing the 500+Mb of junk left behind from the shoddy Windows Installer, things like this are indicative of how Microsoft deal with Windows and software in general.
Yes, I happened across it last month too, when I was considering doing a fresh install of Windows due to running a little low on free space on C.
This program showed 20GB used in \windows\installer, 17GB of which was obsolete.
Worked perfectly, and no clean install needed.
BTW, one thing not mentioned: those using Adobe Reader should read the note about that on the site. You’ll probably want to uninstall it first, then reinstall it later, since its update mechanism can otherwise run into problems.
My Installer folder is 29GBs on Win10 upgraded from Win7.
Interesting when the Windows/Installer folder is “fat”. Nevertheless with, as mentioned, the option to backup checked of course.
Files backup scenario : I clean-up regularly my registry with tools I believe are trustful (when some may be dangerous), namely with CCleaner, Wise Registry Cleaner, Power Tools Lite and Glarysoft Registry Repair (I know the counter-arguments of cleaning up the Registry yet my experience has shown advantages as well). Anyway, what happens if cleaning up the Registry after having removed obsolete files in Windows/installer leads to problems should I copy back to the Windows/installer folder backuped files? I could then encounter issues if the removed files had corresponding items in the cleaned-up registry.
Hence, I believe more in the system/disk backup scheme, but then may be problematic should removed obsolete files lead to a problem far later on, i.e. when aiming to modify/remove an install months later leading to an issue because files were removed and that system backup is too old …
I think I’ll think twice before using PatchCleaner, even with removed files’ and system backup.
Just a Question ?
Why use this if Windows already has disk cleanup that will remove
old installation files also Ccleaner Can do same
Because neither of those touch the Windows/Installer folder, the Windows installer does a god awful job of cleaning up orphaned install *.msi files left over from programs that have be uninstalled.
THANKS ..Appreciate your answer
If you’re short on system space (let’s say with a small SSD system drive C: and a large D: data drive with lots of free space) then a safer solution might be this:
(step 1) Get full ownership rights for the C:\Windows\Installer folder.
(step 2) Move the entire folder with all its contents to the D: drive, so now you have a D:\Installer folder.
(step 3) Make a junction (symbolic link) from the original location to the new location, by entering this command in an admin command prompt window:
mklink /j “C:\Windows\Installer” “D:\Installer”
As a result, Windows will “think” that all the Installer content is still present on the C: system drive, while actually it’s been moved to the D: drive. Windows will still be able to access this moved Installer folder with no problems at all, and it will write any new installer files to that folder at its new location.
For space-saving on the system drive, this solution is safer because you won’t need to actually delete any Installer files. Windows can still find and use them all, even though they are physically on a different drive now.
Thanks for the tip, Henk
May I ask you what becomes of future files ? Will they be set in C:\Windows\Installer” (in which case the folder would be remade) or in “D:\Installer” ?
As you see I’m not fluent with junctions.
the folder already “exists” as a Junction, that means the junction will function as the folder, where the junction points to the new location.
Personally I rather move:
etc folders to a different drive then C:\. So all user data is saved on another disk then windows. When Windows decides to bail out, all I have to do is re-install windows.
But I also build a script for myself to back up various other stuff from the C:\ drive so I won’t lose some important stuff (well, to me anyhow).
“Personally I rather move:
– System Temp folder
– Paging File (I like to create a dedicated partition for this)
You seem to be confusing the Windows\Installer folder with something else John, AFAIK on every version of Windows the Installer folder is a normal folder used to store *.msi & *.msp files that are used when the Windows installer attempts to repair or add&remove features from already installed software.
OK, John. Sounds logical.
I have a dedicated Data partition on my system disk and backup on an external drive, but the Junction process is interesting in case you cannot move a folder because i.e. the data it contains is called by an application which doesn’t allow to change that data’s path, for example I think Google’s Chrome browser, not to mention what we were referring to to start with, the Windows/Installer folder.
> – Paging File (I like to create a dedicated partition for this)
Why would you move the paging file from your SSD? Moving a file that will be accessed all the time and you move it to a very very slow HDD? Makes no sense.
Also be aware, that you cannot symlink appdata\roaming, at least not under W7 as it will produce some subtle bugs.
Makes perfect sense. Constant reading and writing is deadly for SSDs. Unless one can afford a new one every couple of years or there’s enough RAM available to run Windows without a pagefile (also turn off search indexing and hibernate), I’d place it on a HDD as well.
You seem to not understand the difference between ssd an hdd. SSD’s are specifically built and meant for constant reading and writing. It is HDD’s in which constant reading and writing eventually wears them out. Either you are a troll, or have little basic knowledge
Henk, there is a wonderful little utility here:
that obviates the need for using the command prompt to make links. It adds an extension to the explorer shell that shows a “Pick Link Source” option when you right click on a directory. You then go to wherever you want the link to be, right click in any white space and you see the option “Drop As” which when selected gives you a list of link types you can create. I usually use symbolic links because I understand them and they can be moved across disk boundaries. Links are extremely useful for all kinds of things.
Way too many entries from Virus Total: Is this a present from Download.com / thank you NOT !
AVG Generic.879 20151213
AVware Spigot (fs) 20151213
Bkav W32.HfsAdware.88A5 20151212
CAT-QuickHeal PUA.Proinstall.Gen 20151212
DrWeb Adware.Downware.13438 20151213
K7AntiVirus Unwanted-Program ( 004d5f091 ) 20151213
K7GW Unwanted-Program ( 004d5f091 ) 20151213
McAfee-GW-Edition BehavesLike.Win32.CryptDoma.jh 20151213
VIPRE Spigot (fs) 20151213
You need to click on “direct download” on Download.com, if you don’t, you get adware.
Why not download PathCleaner from its homepage mentioned under the article ?
If you can avoid Download dot com’s junkyard, do it :)
The tool Glary Utilities that I use is apparently also cleaning that. I had 0, while this installment of Win7 has been running for about 2 years….
I run only Glarysoft’s Registry Repair (the free version, much limited but as an extra to other Registry repair tools) so that won’t handle Windows\Installer. Yet I remain surprised that your Installer folder is empty. With a Windows 7 installed late Aug. 2013 that folder here sizes at this time 339 MB, small compared to what I read of others, but empty is surprising … truth is I don’t install as I used to when running XP (I’d install then everything which seemed “interesting”, but that was another era…)
I use Glary Utilities (free edition btw) as I said, and with the disk cleanup and the “windows Updates” option selected to clean out, it cleans that out. I run that about monthly after patch tuesdays.
So take that as you may, but more individual small programs don’t make it easier to maintain, just more cumbersome.
Yeah i have Glary Utilities pro. But the Windows update box was unticked. So I ticked that box now. hardly anything was cleared though. Still thanks for the tip.
I will not use Pathcleaner as I have too little knowledge of these things.
Why in the world is this not a portable app? Why does it need to be installed?
For me, cleaning out what one person claims was “17GB max” of files on a drive, files that may be essential later on down the road, essential enough to make a backup and disc image [which will take the original amount of space on some storage device plus an additional amount if a full disc image is made] makes zero sense, both in sound computer maintenance and theoretical performance improvements.
Leave the “orphan files” where they be and move something else such as precious “Kodak moment” photos and videos and music to some external device. What? Four movies off the main drive is the same space saving. Or uninstall that host of seldom or never used programs that take up GBs of space.
Honestly, my main OS drive is 128 SSD; I’m using 25GB [actually less] and have more programs and space than I shall ever need. If, perchance, the need arises, GDrive, Dropbox, OneDrive, space, space, space galor.
Unless, of course, one likes to “pretend” such tools are useful for . . . ? Spending time before death? Something existential, I guess.
Hey, the app seems promising, but I not really see an benefit (yet) compared to the internal MS solution which seems to do his job very good because I cleaned it and after that I used this mentioned tool and it shows 0.00 B to move.
I think this apps need a little bit more optimization like (as already mentioned) an portable version or additional features to check winsxs and so.
What and where is the internal MS solution?
There isn’t an internal MS solution, people seem to be confusing the Windows\Install folder with things like the Windows\SoftwareDistribution folder, and Winsxs folder.
The built in Windows diskcleanup program is meant to clean out the Windows\SoftwareDistribution folder (storage for Windows updates) but like most things from Microsoft it does a half-arsed job and leaves a lot of the old downloaded updates in place, CCleaner does a better job of cleaning out old windows updates that are no longer needed IMHO.
The Winsxs folder probably shouldn’t be touched as it’s used to store different versions of files that maybe needed for different programs, added to that a lot of the files in the Winsxs folder are hardlinked (virtual copies) so tampering with files in the Winsxs folder is the same as tampering with the actual file, deleting a file from Winsxs will lead to it also delete the file from it’s true location.
what do i check in ccleaner to get it to clean out old updates? Do i need CCEnhancer?
Just ran it and was able to move 23GB of orphaned files off my C: drive over to another partition. Had done a complete image backup yesterday so was a safe time to try out the util.
Great find !! I use CCcleaner and Glay and cleanmgr all the time but this found 17GB on my SSD, files moved to hard disk. No adware installed, portable installation is always nice !
Thanks Martin !
Am I missing something? The program says 63 files still used, 0 files are orphaned, 0.00B.
I can’t beleive there are 0 files to clean up :D
Sorry about that David .. I was trying to hide my tracks and went a little overboard :)
No portable version.
Yeah, that’ my point too. I always prefer a portable version.
Is this Windows 10-specific only as I have Windows 7 and don’t have a directory called c:\Windows\Installer (even with the “hide protected operating system files (Recommended)” option disabled in the Folder options)?
I have windows7, and that folder is there. Takes about 700 MB on my system.
otherwise you just type the “C:\Windows\Installer\” in the location bar in windows explorer, then you see its content.
How do you stop “Glarysoft Registry Repair” from phoning-home (supposedly for updates check only) ??
Is there a portable version of “Glarysoft Registry Repair” ?
This program did absolutely nothing for me. I couldn’t find a c:\windows\installer on my win7 64bit first, but after going through folder options i revealed it. It was a bunch of folders and 700mb of content. However… the patchcleaner still just says 62 files in use, 0 orphaned files. Makes no sense to me =D
My folder is only 1.2GB in size on a Windows 7 64bit and it make sense, as except for Windows OS I don’t use any other Microsoft software like :office, outlook, IE… which get monthly updates.
I also use only portable apps.
Yeah, but why would patchcleaner say 0 files to cleanup when there is 700mb in the installer folder then?
Not all files in the folder are orphan. PatchCleaner will only remove orphaned files. The longer you use the operating system, and the more you upgrade, the larger the folder will be, usually.
I just tried this program. Worked fine. Cleaned up about 2GB on Win 8.1 Pro. No complaints.
My Norton Security did object to the downloaded file, which it gave the red flag and promptly deleted !
Potentially useful but, for me, not as it is. Before I allow it to make changes to my system, I’d need to:
1. See a detailed list of any “orphans” it claims to have found.
2. Be able to individually select any orphan(s) that I want to move, to delete or to leave alone.
3. Have a logs of the apps findings and actions. I’d even settle for the ability to take screenshots.
I’m just not ready to blindly trust any program to safely manipulate hundreds or thousands of megabytes of my data.
And yet you use Microsoft Windows….. lol
Thanks for your insightful contribution.
Well thanks for this very useful piece of software! After two years of use (Windows 7 64bts) my 128GB SSD was full except for 14 GB – even though I store and save my data files on a different partition . After having run Patchcleaner to move my orphan files it is a safe 32GB again. So it freed some 18GB.
My one question is: how will this affect the moment (probably coming Summer) that I decide to upgrade to Windows 10? I prefer upgrading rather than doing a fresh W10 install. Will Windows need the moved orphans and search for them? Would it be better to first move the orhans back to their original folder?
thanks for your insights on this
It should not affect the upgrade at all.
You can also set the folder maximum size setting a registry key or GPO.
By default the maximum size is a 10% of the drive where Windows is installed.
Registry key to set to 5%:
Reg Add HKLM\Software\Policies\Microsoft\Windows\Installer /v MaxPatchCacheSize /t REG_DWORD /d 5 /f
Net Stop msiserver /Y
Net Start msiserver /Y
Many thanx, man!!! My C-drive (small SSD) just had 52MB left, but your software removed 22.4 GB! (which I parked on an external drive, just to be sure :-) ). It looks like everything is still working.
So thanx again!
i could delete 10gb without errors, i wish there was a portable
There is a portable version.
This program is a lifesaver! I managed to get back 45 GB of space accumulated over 5 years. I run a MacOS with Win8.1 on a VirtualBox, on a 256 GB SSD. I systematically used SDelete and CCleaner to free up space, but none of them managed to to what this program did. Just WoW!
Win8.1+VBoX+Thunderbird (imap in a local folder) are a killer combination to loose memory in an unexplainable and frustrating way. Although I regularly kept my workspace clean, I knew there was some memory still disappearing over time. Finally I managed to get to it. After many years I can enjoy a bunch of storage space.
I have taken a screenshot of the Patchcleaners “find”, if needed for proof ^_^
2013 bought gaming computer Best Buy ASUS = fast as even today’s (2021) processors for mainly 3D designs BUT GeekSquad did NOT increase C: drive beyond 149GB as PROMISED, soooo all these years have had to move, manage files to 800GB drives D & X UGH as Windows continued to HOG and bully my daily productive software around. NIGHTMARE by Microsoft.
Finally discovered hidden HOG directory INSATALLER graveyard thanks to FolderSize 188.8.131.52. confirmed by TreeSize Free … what to do?
Although PatchCleaner reviews tout 17 – 20GB+ cleaning, I was able to move 60GB+ from Drive C: to D: and rebooted fine, tested core software = fine thus far. No longer fretting a C: drive dwindling free space from 30 to 20 to less than 10% warning with no clue who/what/when/how and what the hack to do about it … fearing past winOS crashes as perhaps this was their causes.
IF this continues, be assured I WILL DONATE but for now, not used to computer fairytales coming true, so it may take awhile for this dream to sink in.
BTW, I am not liking the popups that block & irritate on this website, even though it has become the norm elsewhere ….