Safe to delete C:\Windows\Installer ?

V1N

V1N

Associate
Joined
29 Jul 2006
Posts
1,705
Location
Cornwall
OK, maybe not all of it, but some of it.

For ages now I've been wondering where all the space on my boot drive is disappearing to.

Earlier on I heard my HDD going nuts again, and when I checked, Windows autodeleted my system restore points, and resized my swap file (despite being manually set - so it shouldn't really do that)

Anyway......

I've deleted all the *.wmdb files, as I don't use that any more, and various other logs/files. Got some space back.

Then I had a look in

C:\Windows\Installer

It's over 2 gigs!!

Most of it is folders, such as

{1E04F83B-2AB9-4301-9EF7-E86307F79C72}

The one above has google earth files in, and is only 287k, that's fine, as are the other 65 similarly named folders. In fact, the 65 folders only occupy 20mb. I gather this is Uninstall info? So, I'm not on about deleting that.

Also inside the installer dir, is \$patchCache$\Managed

This has 23 folders, taking up 811mb.

The first folder in there is called

7B97E000527E10F478A01C92247B8F4E

and appears to have Crysis files in it... various cryengine dll files etc

it takes up 408mb


The other folders in there add up to the other 400 odd mb


Do I really need to keep all these?
Some of them are for office, and various other apps I have installed, and vary from a few megs, up to 100mb.

Back to the

C:\Windows\Installer

folder, and below the list of subdirs, is a list of .msp and .msi files, dating right back to when I installed Windows on the machine.
There are 156 of them, taking up 1.19gb.

This is ridiculous! ;)

Now, if the subdirs in this dir are for uninstall info, fair enough, but the 156 msi and msp files surely are no longer needed?

 
Last edited:
If you're pruning Windows then also consider deleting

$*.*
C:\WINDOWS\$NtServicePackUninstall$
C:\WINDOWS\ServicePackFiles
 
If you're pruning Windows then also consider deleting

$*.*
C:\WINDOWS\$NtServicePackUninstall$
C:\WINDOWS\ServicePackFiles

Ah yes, I removed left over SP1 files using this

http://msmvps.com/blogs/erikr/archi...lation.aspx?CommentPosted=true#commentmessage

(I didn't install a beta, I was one of those that had it appear on his Windows Update, without doing a registry hack)

I'm more interested in what is safe to delete from that c:\window\installer folder. Most of it can be dumped I'm sure, but not at the expense of not being able to uninstall software in the future.

I'm sure, for example, that the Crysis files I found in

C:\Windows\Installer\$PatchCache$\Managed\7B97E000527E10F478A01C92247B8F4E\1.0.0

Code:
Directory of C:\Windows\Installer\$PatchCache$\Managed\7B97E000527E10F478A01C92247B8F4E\1.0.0

24/10/2007  21:16        76,120,636 animations.pak
25/10/2007  00:11           110,304 b64.dll
24/10/2007  21:13         1,778,912 cry3dengine.dll
24/10/2007  21:13         2,183,392 cry3dengine.dll1
24/10/2007  21:13         2,942,176 cryaction.dll
24/10/2007  21:13         4,517,088 cryaction.dll1
24/10/2007  21:13         1,942,752 cryaisystem.dll
24/10/2007  21:13         2,434,272 cryaisystem.dll1
24/10/2007  21:13         1,574,112 cryanimation.dll
24/10/2007  21:13         1,743,072 cryanimation.dll1
24/10/2007  21:13           840,928 cryentitysystem.dll
24/10/2007  21:13           876,256 cryentitysystem.dll1
24/10/2007  21:13           394,464 cryfont.dll
24/10/2007  21:13           366,304 cryfont.dll1
24/10/2007  21:13         2,823,392 crygame.dll
24/10/2007  21:13         4,390,112 crygame.dll1
24/10/2007  21:13           197,856 cryinput.dll
24/10/2007  21:14            81,632 cryinput.dll1
24/10/2007  21:13           386,272 crymovie.dll
24/10/2007  21:14           238,816 crymovie.dll1
24/10/2007  21:13           943,328 crynetwork.dll
24/10/2007  21:14         2,155,744 crynetwork.dll1
24/10/2007  21:13         1,991,904 cryphysics.dll
24/10/2007  21:14         1,963,744 cryphysics.dll1
24/10/2007  21:13         3,036,384 cryrenderd3d10.dll
24/10/2007  21:14         3,084,000 cryrenderd3d10.dll1
24/10/2007  21:13         3,024,096 cryrenderd3d9.dll
24/10/2007  21:14         3,326,176 cryrenderd3d9.dll1
24/10/2007  21:13           885,984 cryrendernull.dll
24/10/2007  21:14           811,744 cryrendernull.dll1
24/10/2007  21:13           660,704 cryscriptsystem.dll
24/10/2007  21:14           662,240 cryscriptsystem.dll1
25/10/2007  00:11         4,674,784 crysis.exe
25/10/2007  00:11         4,498,656 crysis.exe1
25/10/2007  00:11            53,472 crysis64.exe
25/10/2007  00:11            17,120 crysisdedicatedserver.exe
25/10/2007  00:11            17,632 crysisdedicatedserver.exe1
24/10/2007  21:13           644,320 crysoundsystem.dll
24/10/2007  21:14           581,856 crysoundsystem.dll1
24/10/2007  21:13         2,098,400 crysystem.dll
24/10/2007  21:14         2,988,768 crysystem.dll1
17/03/2008  20:39                22 dir.bat
19/09/2007  16:29           294,912 pbsv.dll
24/10/2007  05:15       283,674,293 shadercache.pak1
24/10/2007  02:15           363,311 shaders.pak
24/10/2007  21:13            13,024 shallocator.dll
24/10/2007  21:14            13,024 shallocator.dll1
03/10/2007  12:28               515 _35AC5709F9447F310BF9674FAE242A23
19/10/2007  13:34               210 _38002D92AD31075D2152F42E5581F8DD
27/03/2007  16:04                48 _38D76FF8AFBC7E46CE055E178B10E612
25/10/2007  00:11           230,624 _3ECB084F3B170E9530C07900FE3DA566
03/10/2007  12:29               517 _EB48D75B5555637BB32AF66796B186A3
27/03/2007  16:03                48 _EC81295B68A0A870A3C5CB272232E3C4
              53 File(s)    428,654,352 bytes

Are still required... but as for the rest? What's safe to delete, and what's not?
 
I've also loaded the Windows Installer Cleanup program, but to be honest, the message at the top put me off ;)



I'd really rather know what's safe to delete, and what's not.

If nobody knows, I shall start to move the bigger folders away to another drive, rather than delete them, and if problems occur, I can move them back.

V1N.
 
format c: will clear up quite a bit of space ;-)

Actually I did consider that the other day.
Space was getting so bad, I figured I may be just as well to just start from scratch, and that would clear the bloat out.

Thing is, if I reinstall the same software and patches that I have done so far, it seems likely this folder will grow and grow again!

I've got 3gb free on my boot drive for now, and I've got a new boot drive ordered... but it's kind of beside the point now. After googling and finding other people with an over inflated Installer folder, I just want to know what's safe to delete. Surely Windows Installer doesn't need all that? ;)
I guess a lot of it should have been deleted after install, but wasn't, for whatever reason.

I did have plenty of space left on my raptor, the 36gb was more than enough for Windows and apps, with all data/media etc, being stored on other drives, but as time goes on, space has been disappearing, I've had to move my outlook PST files to another HDD, and I was trying to find where the space was going. Seems 2gb of it has been in here!

V1N.

EDIT: At least I'm not alone. Googling "c:\windows\installer" comes up with loads of similar reports. This chap has lost 23gb so far! http://www.smallbizserver.net/Default.aspx?tabid=53&forumid=11&postid=67471&view=topic
 
Last edited:
If anybody else ever comes across this problem, of having an inflated c:\windows\installer folder, maybe this will help

http://blogs.msdn.com/heaths/archive/2007/01/31/how-to-safely-delete-orphaned-patches.aspx

I tried msizap here, but it didn't delete anything.
After further looking, it seems just about every patch I've ever installed is in here. Just found one for UT3 as well.

Just checked my old XP partition, and that has a half gig installer folder too.

Guess that's just the way Windows works.

Oh well, I have a 2nd hand 74gb Raptor on the way now to replace this one, so I'll have a bit of free space again.

If anybody has any other tips on useless log/cache/etc files that are common in Vista, feel free to post :) I think I've got most of them, and I've just cleared off a good few gigs of space as well, but it's always nice to know where the HDD space is going.

V1N.

EDIT: Phew, even my poor old laptop, with a 20gb HDD has 1.12gb of Windows\installer files!

EDIT2: Oh well, I've decided to take the better safe than sorry option, and leave it alone ;) It does seem a waste to me though, like having 400mb of Crysis files duped in there. Sure I installed the patch, but why keep a copy of it there? Just for uninstall purposes? Anyway, as I said, better safe than sorry! Incidentally, I did run the script from the website above that's meant to delete just the orphaned patches, WiMsps.vbs. It did list some of the files, which may be safe to delete.
 
Last edited:
Can't say for sure this is true for all apps but the files in the Installer folder are there in some case to configure the product for new users. So for example for Office 2003 if you remove the Installer files copied by the installation then any new users when they launch their first office 2003 app the installer config for that user may well fail.
 
Can't say for sure this is true for all apps but the files in the Installer folder are there in some case to configure the product for new users. So for example for Office 2003 if you remove the Installer files copied by the installation then any new users when they launch their first office 2003 app the installer config for that user may well fail.

Yes mate, that makes sense.
In my case however, I already have a folder in the root, called MSOCACHE, which is just over half a gig big, just for Office install files!

I guess in this day and age, it doesn't pay to try to optimize, and keep things tidy like we used to years ago. It's an easier, though less elegant solution, to just keep chucking bigger HDDs in there. Shame, the 36gb Raptor has served me well over the years.

V1N.

EDIT: Although I've just learned that the MSOCACHE folder can be moved :)
http://thebackroomtech.wordpress.co...fice-msocache-directory-to-a-different-drive/
(unless you have Office 2007)
 
Last edited:
Thought I'd post one last post on the subject, in case it helps anybody else in the future, searching on this matter, then I'm done.

http://blogs.msdn.com/heaths/archive/2007/01/17/the-patch-cache-and-freeing-space.aspx

The Patch Cache and Freeing Space
When you install a patch using Windows Installer, the .msp file is cached in the %WINDIR%\Installer directory. This accounts for some of the space required by Visual Studio 2005 Service Pack 1. A single patch is cached only once regardless to how many products the patch applies.

Starting with Windows Installer 3.0, any patches that contain the MsiPatchSequence table cause the Windows Installer service to cache any of the original files being replaced into the baseline cache. Any files being replaced in the latest minor upgrade by small update patches with this table are also cached. It is this baseline cache that consumes a lot of drive space on the system drive after installing VS 2005 SP1. The baseline cache facilitates patch uninstall by storing the original files so that they can be copied back to the target locations. Files in existing patches do not need to be cached because they are contained within the cached .msp files. For this reason and because Windows Installer will require these patches during repair and future patch scenarios, the .msp files should not be deleted except by uninstalling the patch from each product to which it's applied. The baseline cache also improves performance when using binary deltas.

Baseline caches are created separately for per-user unmanaged installations, and for both per-user managed and per-machine installations. If you enable Windows Explorer to display system files or type dir /a:s under %WINDIR%\Installer you'll find a directory structure like the following:

%WINDIR%\Installer
$PatchCache$
UnManaged
{UserSID}
{Squished ProductCode}
{ProductVersion}
Managed
{Squished ProductCode}
{ProductVersion}
Be careful doing any modifications under %WINDIR%\Installer. Like registry changes, making mistakes here could cause problems that may require the difficult task of rebuilding the Windows Installer cache or even reinstalling Windows.

To free up space, you can remove the baseline cache for Visual Studio 2005 under %WINDIR%\Installer\$PatchCache$\Managed by deleting the directory with the squished GUID representing the ProductCode for whichever Visual Studio 2005 products you have installed. The squished GUID is a transformed ProductCode. Attached you'll find a list of product names, product codes, product languages, product editions, and squished GUIDs for Visual Studio 2005 and the .NET Framework 2.0.

Again, be aware that 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.

Published Wednesday, January 17, 2007 10:14 AM by Heath Stewart
Filed under: Installation, VS 2005 SP1, Visual Studio

Attachment(s): Squished Product Codes.csv
Comments
Tuesday, January 30, 2007 4:04 PM by AJ
# re: The Patch Cache and Freeing Space
I thought I'd toss out a well-known but often overlooked house cleaning tip. MsiZap G! is helpful for clearing out Windows Installer resources that are no longer being referenced. For whatever reason, Windows Installer doesn't have the best garbage collection after an uninstall or rollback.

Brilliant, I will run MSIZAP G! after next time I've made an Acronis image, and see if it saves space, as other people have reported. That should only delete orphaned files, and leave the important ones.

V1N.

EDIT: Meh! Decided to run msizap G! anyway, as I only did an Acronis backup on Saturday. It ran, but it didn't delete anything. Guess I'll leave the folder as it is, except maybe try some standard NTFS compression on some of the bigger ones, to see if it helps.
 
Last edited:
I only have a 25GB boot partition, so I tend to delete a lot of that installer stuff, e.g. I also had a load of Crysis patch files. It's unlikely that I'll ever want to roll back Crysis to its pre-patch state, and if for some reason I do, I'll just reinstall it from the DVD... same goes for a lot of my other applications.

A little program I find really useful for figuring out where all my disk space goes is WinDirStat.
 
Back
Top Bottom