HOW TO: Clean out Windows\Installer folder correctly
When disk space is running out on a system disk, may it be on a server or a client, there are certain things to clean out. One of them being the %SYSTEMDRIVE%\Windows\Installer folder. You cannot under any circumstances delete files from this folder manually as this not only may but most likely will break software that is installed using MSI files, or Windows Installer files.
The %SYSTEMDRIVE%\Windows\Installer folder is a cache for installation files and patches (MSP files) and removing those will cause you to not being able to repair or uninstall applications, and in some cases not removing patches or applying new patches to software. In the event when you actually did delete this cache you can rebuild the files you need manually by extracting the files from original installation media, from patch packages etc but this is a time consuming and not that easy task to accomplish.
But let me get to the point. If you do want to free disk space you can clean out the %SYSTEMDRIVE%\Windows\Installer folder by downloading Windows Installer Cleanup Utility (NOTE: This tool has been retired and is no longer available from Microsoft) and then running the command
msizap.exe G!
When running this, the installer and patch packages are enumerated and unreferenced packages are considered to be safe to delete and are thereby also deleted. Depending on the age of the system and the number of applications installed, this action can free a significant amount of disk space.
8 Comments
Add a Comment
You must be logged in to post a comment.
I installed msizap.exe and ran it a recommended above, but I got the errors below. I’d really appreciate any ideas anyone has:
MsiZapInfo: Performing operations for user S-1-5-21-2385871623-2839697288-657975
835-1005
Removing orphaned cached files.
Error opening 9040111900063D11C8EF10054038389C\InstallProperties subkey of Pr
oducts key for S-1-5-18 user. Error: 2.
Error opening 9040711900063D11C8EF10054038389C\InstallProperties subkey of Pr
oducts key for S-1-5-18 user. Error: 2.
Error opening AAE908DA9CFCDAA43A47BD69582F2C62\InstallProperties subkey of Pr
oducts key for S-1-5-18 user. Error: 2.
Error opening E75939E100E5E5640B3B31E95079FC5A\InstallProperties subkey of Pr
oducts key for S-1-5-18 user. Error: 2.
Removed file: C:\WINDOWS\Installer\c9b6d.msp
FAILED to clear all data.
Thanks,
Pedro Pico
@pedropico1: You probably have to run cmd.exe as administrator (right click and choose “Run As Administrator”) to be able to clean it properly and I suspect that you get the access denied because you do noy have sufficient priviliges as UAC is turned on.