This folder is taking up nearly a GB of my C partition. Is it possible to just delete it?

link|improve this question

67% accept rate
feedback

6 Answers

up vote 11 down vote accepted

I think it should be safe to remove the files, provided you're able to download them again in future if they're needed or if you have access to your original install disks. I had something similar on my computer, I just deleted it and install things from the original disk every time it asks me now. Inconvenient, yeah; but I don't often install stuff and it's a lot better than having a whole ton of space on my hard drive wasted.

link|improve this answer
Yeah, C:\WINDOWS\Installer\$PatchCache$ on my hard drive is empty, so I guess if it's safe for me it should be safe enough for you. – Sticky Dec 13 '09 at 7:42
I'll try to move it and see what happens – James Dec 13 '09 at 8:21
Reading the command line options for msizap, I wonder if manually deleting these files is indeed safe. Like for msizap * Microsoft writes: Removes all Windows Installer folders and registry keys, adjusts shared DLL counts, and stops Windows Installer service. Also removes the In-Progress key and rollback information. Does Windows also do this when manually deleting the files? (Do not run msizap without understanding what it does; see comments at Joshua's answer.) – Arjan Dec 2 '10 at 8:26
feedback

Heath Stewart's The Patch Cache and Freeing Space on MSDN blogs explains in detail. An excerpt:

[..] cause the Windows Installer service to cache any of the original files being replaced into the baseline cache. [..] It is this baseline cache that consumes a lot of drive space on the system drive after installing [..] The baseline cache facilitates patch uninstall by storing the original files so that they can be copied back to the target locations.

[..] by removing the baseline cache for a product, future repair, patch install, and patch uninstall scenarios may require your original installation media. If you have the drive space it is recommended that you keep the baseline caches available.

link|improve this answer
feedback

You could also try the MSIZAP utility from Microsoft. It has a "safe" option, 'G'.

link|improve this answer
2  
Nice. But according to the article mentioned by Scandalon: Take care when using msizap, though. "G!" is safe, but exploring other switches without understanding their ramifications could mean you cannot patch products anymore because product registration is missing (essentially making it appear to Windows Installer that your product is not there). Treat this like editing the registry. – Arjan Dec 2 '10 at 8:19
I tried running this on Win7 (my folder's 9.2GB) and saw no reduction in disk usage. Is msizap still needed with Win7? – Drew Noakes Apr 17 at 23:48
@DrewNoakes if you used the "safe" option, then I am going to guess that those files were all considered necessary. – Joshua Drake Apr 18 at 13:57
feedback

Is it possible? Yes. Should you? Probably not, if you don't have to. Windows Installer keeps those files around because it think they're needed if you ever have to install another patch on top of them (or uninstall those particular patches).

link|improve this answer
feedback

The solution is to use the command from Start → Run → cmd:

rmdir /q /s "C:\WINDOWS\Installer\$PatchCache$" 

Warning: This will not affect the Installer folder. All content msi files created there will remain until the program is uninstalled. $PatchCache$ can grow up to GB of size which takes a lot of my hard disk space.

This command will delete $PatchCache$, and after you finish, run

dir C:\WINDOWS\Installer\$PatchCache$

… to see if the folder is still there.

You can also use

del /q /s %tmp%

which deletes all files in the temporary folder, which are created by installing software.

link|improve this answer
I assume the user knows how to delete the files in a folder. The question is whether it's safe to do so. – Derrick Coetzee Apr 22 at 7:24
feedback

What I do for this folder is revisit it every now and then and only delete packages in there that are at least six months old. This way, if there's a bad patch that I need to roll back, I can usually still do it.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.