How to Clean Up the Windows Installer Cache Folder

When you install a program in Windows, the program’s .msi or .msu setup package gets copied to the C:\Windows\Installer folder. The Installer folder is a protected folder with System & Hidden attributes and is found under your Windows folder.

windows installer - delete unwanted files

What is the Windows Installer folder?

The Installer directory is intended to serve as a cache for installer data files for various applications installed on the computer.

Sometime later, you may decide you want to repair, uninstall, or reinstall the program via Apps & Features or Programs & Features in the Control Panel. At that time, the system needs the .msi package from the Installer folder to repair, reinstall, or cleanly uninstall the software.

If the corresponding setup package (.msi or .msp) file isn’t found, Windows throws the error “The installation source for this product is not available. Verify that the source exists and that you can access it.” when trying to repair or uninstall the problem.

uninstall program failed missing .msi installer

Windows Installer registry entries

When a setup program (i.e., Windows Installer package) is run, registry entries are created for that program under the following branches:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
HKEY_CLASSES_ROOT\Installer\Products
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\{SID}\Products
windows installer - products registry key
Installer registry key showing the Product name, Package file name, Uninstall command, etc.

The SID can be something like S-1-5-18. S-1-5-18 is the Security Identifier for the “Local System” account. If the software you’ve installed used your account’s credentials or token, then it’s written under your {SID} key in the registry. See the Microsoft article Well-known security identifiers in Windows operating systems.

Note: For 32-bit programs installed on a 64-bit Windows computer, the entries get recorded under the equivalent SOFTWARE\WOW6432Node registry node.

How to Safely Clean Up the Windows Installer Folder

Over time, the Installer directory may grow and consume a massive amount of hard disk space. You may be wondering if you can delete files in the Windows\Installer directory or not.

Can you arbitrarily delete the Windows\Installer folder or some of its files?

In short, NO! You should never randomly delete the contents of the C:\Windows\Installer folder manually. The system automatically manages it. See the More Information section at the end of this article. Deleting the Installer folder will cause errors when installing programs. Please see Error 0x80070660: The Temp folder is full or inaccessible.

Sometimes, during the software uninstallation routine, Windows Installer patches may become orphaned. i.e., when a program is uninstalled, the corresponding .msi package is somehow left behind in the Windows Installer folder. Only the orphaned packages can be deleted.

So, how do you find the orphaned .msi files in the Windows Installer folder?

There is a useful program called PatchCleaner that will identify orphaned files in the Installer folder. PatchCleaner then offers you the option to delete orphaned files or move them to a different location for testing.

Download PatchCleaner from HomeDev Software, and run it.

patchcleaner to clean up windows installer folder

PatchCleaner enumerates the list of installers, component codes, and corresponding .msi file names programmatically using Windows Scripting.

Then it compares the list of package files located in the Installer folder with the Products list found in the registry. The .msi or .msu files that have no reference in the registry are the orphan files.

patchcleaner to clean up windows installer folder



Here are the details of “in use” or valid program entries.

patchcleaner to clean up windows installer folder

And the detailed information of the orphaned entries is shown as well:

patchcleaner to clean up windows installer folder

You can either delete the orphaned setup package or move it to another folder and then safely delete it after a few days.

Hope this article helped you recover valuable disk space by safely cleaning up the Windows Installer folder on your computer.


More Information

Quoting Joseph Conway (MSFT)

Can you safely delete files in the %windir%\Installer directory?

So, the question usually asked is: Can I safely remove the files in this directory? The answer is flatly: No. So let’s talk about why this is a bad idea.

First, it is not supported. If you remove files from this directory and have issues, you may need to reinstall the application to get back to a good state. Therefore, that would suck for both you and the engineer that needs to deliver that message.

Second is the overall idea that you really should not remove items in the Windows directory. We build and test our software based on the existence of specific files and directories. When those files and directories dont exist, bad things can and will happen. However, that is a generalization that usually upsets many people so let’s be more specific. This particular directories job is to act as a cache location for Windows installer based applications. It holds stripped down versions of the Windows installer data files. During application install, update of the application or application removal, this directory is used by the application to confirm the existence of previously installed items to determine the next steps the installer needs to take. The files are different from machine to machine, so if you expect to delete the files in the directory and then copy them over from another machine, that would be incorrect. Removing items from here could cause you to have application crashes, or worse, require the reinstallation and patching of the application.

The proper way to alleviate space pressure in this directory is to uninstall any unneeded applications.

I hope that this makes sense and you can see why removing files from this directory can cause you unneeded pain.

Source: Can you safely delete files in the %windir%\Installer directory? – The Windows Servicing Guy – Site Home – TechNet Blogs.


One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time.

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a ten-time recipient of the Microsoft MVP award in Windows Desktop Experience (Windows Shell), from 2003 to 2012. Ramesh founded Winhelponline.com in 2005.

Leave a Comment