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

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 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.

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

  1. Clean up leftover windows installer files with msizap | Says:

    […] unless you really know what you’re doing. More info on this tool and handy howto available here. Share this […]

  2. Jim Christian Says:

    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.

  3. David Dexter Says:

    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.

  4. Kunal Says:

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

  5. Lindsey Says:

    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”

    • Julie Says:

      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

  6. andy Says:

    MS still has this tool, but well hidden:

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

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: