Can I delete the folder "C:\WINDOWS\Installer\$PatchCache$"?

297,726

Solution 1

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.

Solution 2

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.

Solution 3

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

Solution 4

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.

Solution 5

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

Share:
297,726
James
Author by

James

Updated on September 17, 2022

Comments

  • James
    James almost 2 years

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

  • James
    James over 14 years
    I'll try to move it and see what happens
  • Arjan
    Arjan over 13 years
    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.
  • Drew Noakes
    Drew Noakes about 12 years
    I tried running this on Win7 (my folder's 9.2GB) and saw no reduction in disk usage. Is msizap still needed with Win7?
  • Joshua Drake
    Joshua Drake about 12 years
    @DrewNoakes if you used the "safe" option, then I am going to guess that those files were all considered necessary.
  • Chiara Coetzee
    Chiara Coetzee about 12 years
    I assume the user knows how to delete the files in a folder. The question is whether it's safe to do so.
  • user1696603
    user1696603 over 11 years
    "MSIZAP and MSICUU2 are no longer supported because they have been found to cause problems. Please use the Program Install and Uninstall troubleshooter available here: support.microsoft.com/kb/2438651" -- 11/22/2011, Jeff Ingalls MSFT
  • Joshua Drake
    Joshua Drake over 11 years
    @mattwilkie You may want to include that as an answer too.
  • Nux
    Nux over 9 years
    Note that he mentions that you should only remove some sub-folders from $PatchCache$\Managed\ . For me I removed MS Office folders as they were taking a lot of space and I have DVD for them. You should be able to easily recognize MS Office folders as they have files with MS Office icon in there.
  • user765827
    user765827 about 9 years
    thanks for this - I moved the whole folder off onto a memory stick and rebooted and all was well. Saved me over 2GB (Win 7 x64)
  • user3773503
    user3773503 about 9 years
    It's recommended at least to compress C:\WINDOWS\Installer\$PatchCache$ or the full C:\WINDOWS\Installer folder. The simple step can save really much space on the disk. There are exist many msp files which are not use cab inside. Such msp files can be good compressed and one get some disk space for free.
  • Holistic Developer
    Holistic Developer about 9 years
    Heath also explicitly said in a comment to his post that "you can delete %windir%\installer\$patchcache$. This may cause you to get source prompts for binary delta patches as well as during patch uninstall, but is otherwise okay. You must not delete any files directly under %windir%\installer, though. This will prevent you from repairing, patching, or even uninstalling products that use those files no matter what the type."
  • Daniel Albuschat
    Daniel Albuschat over 8 years
    IMHO your answer is irritating, since it does not address the original concern whether it is safe, but instead provides a details "step-by-step" intro that suggest that it's totally safe to do everything you write - this is misleading and may cause potential readers a headache in the future.
  • Shanteva
    Shanteva almost 8 years
    @mattwilkie that link is dead
  • Joshua Drake
    Joshua Drake almost 8 years
    @novaterata support.microsoft.com/en-us/help/17588/… appears to be working.
  • Shanteva
    Shanteva almost 8 years
    JoshuaDrake thanks! Nobody does dead links like MSFT. @mattwilkie how do you replicate the behavior of MSIZAP /G with this tool?
  • shashwat
    shashwat about 4 years
    @mechanarchy you may want to disable "Hide Protected System Files" from Options and then check.