Howto: Use msizap to remove orphaned cached Windows Installer Data Files to increase free disk space

by admin on January 19, 2009

Msizap is a command-line tool that can delete the configuration data that Windows Installer maintains for products that it installs, including the directories, files, registry subkeys, and registry entries in which Windows Installer stores configuration data.

Running msizap.exe with the G parameter removes orphaned cached Windows Installer data files for all users. Running this command on an old Windows XP machine allowed me to reduce the size of the C:\Windows\Installer directory from 3.6GB down to 875MB.

This computer had so many orphaned files due to the constant installation and uninstallation of software such as Java, Flash, Acrobat Reader, and other utility software over the years. Yes, orphaned files persist on your hard drive despite following proper uninstall procedures.

To run msizap, login to the machine as an administrative user and launch a command window. Navigate to the directory that contains msizap.exe, then type the following command:

msizap !G

The G option removes the orphaned cache files, the exclamation point forces a ‘yes’ response to any prompt.

While removing orphaned files should not have any negative impact on your Windows installation, be aware that msizap is a powerful tool that can cause problems if used incorrectly.

Msizap can be downloaded as a part of the Microsoft Windows Server 2003 Support Tools or the Windows Installer CleanUp Utility. I was unable to find the Windows Installer CleanUp Utility by searching Microsoft’s download site, so note that as of today the file’s name is msicuu2.exe if you the above link goes dead in the future.

If you don’t want to install the Windows Installer CleanUp Utility, use a program such as Universal Extractor (aka UniExtract) to extract the individual files. Once you extract the files, you’ll notice msizap.exe does not exist, but you will find MsiZapA.exe and MsiZapU.exe.

There are two versions of MSIZAP.EXE: MsiZapA.exe (for use in Windows 95, Windows 98 and Windows ME), and MsiZapU.exe (for use in Windows NT, Windows 2000, Windows XP, and Windows Server 2003). The appropriate executable should be renamed MsiZap.exe.

Current msizap.exe options are as follows:

Usage: msizap T[WA!] {product code}
msizap T[WA!] {msi package}
msizap *[WA!] ALLPRODUCTS
msizap PWSA?!

* = remove all Windows Installer folders and regkeys;
adjust shared DLL counts; stop Windows Installer service
T = remove all info for given product code
P = remove In-Progress key
S = remove Rollback Information
A = for any specified removal, just change ACLs to Admin Full Control
W = for all users (by default, only for the current user)
M = remove a managed patch registration info
G = remove orphaned cached Windows Installer data files (for all users)
? = verbose help
! = force ‘yes’ response to any prompt

For more information on the Windows Installer Cleanup Utility and msizap.exe see KB290301.

{ 6 comments… read them below or add one }

Jim Christian April 2, 2009 at 1:01 pm

Good tip. I have a two year old Windows XP computer that has gone through lots of software installs and uninstalls. The Windows\Installer directory had grown to 12 GB. After running msizap to remove orphaned files as suggested, the Windows\Installer directory was down to 3 GB.

Reply

David Dexter January 4, 2010 at 10:59 pm

Thank You! Thank You! Thank You!
After searching my computer to see why I only had 1.6 GB left I found a slew of .msp files. Until I found your information I had no idea how to properly remove the “orphaned” patches. I went from 1.6 GB of free hard drive space to 33.5 GB! Amazing the micrsoft, with all it’s updates, has not provided this as an automated background function that keeps the system clean without having to go through finding the problem and solution on your own.

Reply

Kunal March 4, 2010 at 11:55 pm

Thanks for this awesome blogpost, Julie. Helped me clear about 22GB of unwanted crap off of my machine!

Reply

Lindsey March 30, 2010 at 11:22 am

It just took me an hour to figure out how to pull up a command window. Can anyone dumb this down more for me? How do I “Navigate to the directory that contains msizap.exe, then type the following command: msizap !G”

Reply

Julie March 31, 2010 at 12:33 pm

To open a command window Start > Run and type cmd and press enter

To naviate to the directory that contains msizap.exe type

cd c:\directory\
and press enter

Replace c:\directory with the drive letter and path where you downloaded msizap

Type msizap !G and press enter

Reply

andy August 12, 2010 at 4:24 pm

MS still has this tool, but well hidden:

http://download.microsoft.com/download/e/9/d/e9d80355-7ab4-45b8-80e8-983a48d5e1bd/msicuu2.exe

have fun!
(and do not f… up your system!!)

Reply

Leave a Comment

{ 1 trackback }

Previous post:

Next post: