This folder is taking up nearly a GB of my C partition. Is it possible to just delete it?
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.
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.
You could also try the MSIZAP utility from Microsoft. It has a "safe" option, 'G'.
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.
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).
If in doubt, you can always go safer way: simply compress entire Installer map! Right click on the Installer map (or just $PatchCache$ map) and choose Properties. On General tab, click Advanced button. Finally, check Compress folders to save disk space. If asked, choose an option to compress all subfolders and files.
This way you can gain up to 30% of free space (or in your case, nearly 300MB), and you keep everything in case you'll need this stuff later on. And system speed and response wont be affected much since system rarely accesses this map.
You can apply this tactic to several other non-essential system maps, thus recovering lots of free space on your drive!
You can delete the folder content.
Follow these steps:
1) Stop Windows Installer the service.
2) Set the registry key that indicates the maximum folder size to zero.
3) Delete folder content.
4) Start Windows Installer the service.
5) Stop Windows Installer the service.
6) Set the registry key that indicates the maximum folder size to 10 (default).
7) Start Windows Installer the service.
Net Stop msiserver /Y Reg Add HKLM\Software\Policies\Microsoft\Windows\Installer /v MaxPatchCacheSize /t REG_DWORD /d 0 /f RmDir /q /s %WINDIR%\Installer\$PatchCache$ Net Start msiserver /Y Net Stop msiserver /Y Reg Add HKLM\Software\Policies\Microsoft\Windows\Installer /v MaxPatchCacheSize /t REG_DWORD /d 10 /f Net Start msiserver /Y
Instead use MKLINK to junction the folder to an alternate drive if you have space
• on drive D: create sub folder named C
• cut and paste folder Installer to subfolder C-Windows located on drive D:
• run CMD
• type: CD C:\Windows
• type: MKLINK /J Installer D:\C-Windows\Installer
• type: EXIT
The solution is to use the command from Start → Run →
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
… 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.