Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been looking on an XP machine what is using all that diskspace, and it turns out C:\Windows\Installer is high up there on the list of directories that use the most diskspace.

It seems to contain a cache of msi and msp files.

Is it safe to delete those? To save diskspace, I've been deleting the "$KB...$" directories for ages without any problems. I want my Windows Updates in my system, why you would want to uninstall them is something that I have never understood. (Except when you're on an update revision board professionally or something of that order.)

share|improve this question
7  
Compress it if you use NTFS (which you should be by now) – Chris Marisic Aug 17 '09 at 1:56
1  
It's useful to uninstall Windows Updates if they break your system. – Caltor Oct 22 '13 at 15:28
    
@Caltor, If they break your system, they have already failed. What if uninstalling windows updates breaks our system? Should Windows add another mechanism to undo uninstall in case uninstall fails? – Pacerier Nov 13 '14 at 3:28
    
I recently came across this one again: blog.seattlepi.com/microsoft/2008/06/24/… and it's there also: in hindsight, Windows Updates should have gotten a separate treatment, not include them with the installed packages. – Stijn Sanders Nov 13 '14 at 9:49
    
@Pacerier I presume you're being sarcastic. Just because something breaks in one way doesn't mean we give up on it entirely, otherwise we might as well dispense with just about every safety device ever invented. I had a very real scenario where a windows update broke some of my VBA ADO code and uninstalling the windows update was the workaround whilst I rewrote the code. P.S. The mechanism to undo an uninstall is Windows System Restore. – Caltor Nov 17 '14 at 10:45
up vote 60 down vote accepted

No, it's not. Windows Installer uses that to cache installation files for anything installed on the machine using Windows Installer. At a minimum, you could lose the ability to add or remove programs, at the worst, you may lose the ability to run some programs.

Since Windows Update can also deploy Windows Installer patches, you could also prevent your machine from receiving Windows and Office updates.

share|improve this answer
7  
jasonh speaks true. Some applications "advertise" features by showing icons and commands for them, but do not actually install the feature until you first use it. Deleting installers will make such applications unusable. Don't do it. – Dour High Arch Aug 17 '09 at 3:48
3  
I haven't seen one of those in a long time.... – RCIX Aug 19 '09 at 2:13
5  
His main concern is to free up disk space, so a yes/no answer doesn't quite help here. – deddebme Aug 22 '09 at 16:28
1  
@RCIX: Do you use Office? Office uses advertised shortcuts. If you right click on the shortcut and bring up the properties and try to look at the target, it will be grayed out. That's an advertised shortcut. – jasonh Aug 23 '09 at 21:14
1  
@deddebme: It wasn't a yes/no thing, I said it's not OK to do it and listed the range of things that could be broken by doing it. – jasonh Aug 23 '09 at 21:17

You most likely need the content of the installer folder when you try to uninstall programs (e.g. microsoft office will complain some random named .msi/.mcp files when you try to remove it)

But if disk space is concern to you, compress the installer folder through NTFS! I do so in my ASUS Eeepc901 netbook, since it has a horrible 4G primary partition only.

Right click the folder "Installer"->properties->advanced->check "Compress contents to save disk space."->"OK"->"OK" again.

You'll be surprised by the space it saved.

share|improve this answer
2  
+1 for compressing the installer folder. 5.07 GB to 3.44 GB! – Leftium Oct 18 '11 at 23:14
    
How do you click the installer folder? It's a hidden system file, I can't get it to show in Explorer. I've only been able to use the command line 'Compact' command instead. – Slaggg Mar 3 '12 at 20:08
1  
Open the folder by Start > Run > "c:\windows\installer", then right-clicking on the empty space (which is the same as the folder itself). – Patrick Szalapski Dec 8 '14 at 15:05
    
@Slaggg Just enable hidden files to be seen in explorer. It allows you to spot viruses on USB drives as well. – Tomáš Zato Nov 5 '15 at 15:07

As others have said, there are definite contraindications for removing files from that directory structure. I would also recommend against it.

However, if you are determined to proceed anyways, you can more properly do so using the Windows Installer CleanUp Utility. This will clean things up better than simply deleting files. This tool is, however, generally used for removing installation files that have become corrupt thus preventing you from uninstalling something the normal way.

The Windows Installer CleanUp Utility actually uses the MSIZAP.EXE command-line utility to perform the work.

share|improve this answer
1  
I think compressing that folder is safer than deleting the contents of it. – deddebme Aug 22 '09 at 5:44
2  
Agreed, the first thing I did was recommended against deleting. But because the question was about the safety of deleting, it makes sense to point out the safest way to go about that, even if it's not a good practice. – Gregyski Aug 22 '09 at 17:34

No, it's not safe to delete the whole dir.

But there are ways to remove the unused .msp files by running WICleanup.

share|improve this answer

If you delete this folder, you will experience issues later when you attempt to repair, uninstall, upgrade, reinstall, etc.

The way MSI installers work is they run themselves whenever a patch must be rolledback, something uninstalled, etc.

Future Windows Updates may need the contents of this folder.

MSI installers are the devil :() Don't toy with them.

share|improve this answer
    
I don't think Windows Updates touches the Installer folder that folder (or at all), since windows updates usually save the uninstall information in "$KB...$" directories, which I always delete when I see them. – deddebme Aug 22 '09 at 5:47
    
Some Windows Updates are MSI based. – AaronLS Aug 24 '09 at 19:39

I agree with this answer.

But being curious, whats the harm in sending the folder to the Recycle Bin? See what it actually does to your applications. See if you still have the ability to uninstall.

I've always thought the only way to learn is by breaking things.

Edit: Because of the downvotes, I wish to add that it's always a good idea to back up before you do anything that can potentially destroy/hinder your system.

share|improve this answer
5  
If you're going to try this answer for the educational value of the experience, make sure you perform a complete backup first -- you may need it ;-) – Chris W. Rea Aug 16 '09 at 23:15
    
So much hate... +1 because most of the time I'm either breaking something or learning from something that Windows (and sometimes a Linux tool) broke by itself. – Camilo Martin Feb 28 '12 at 13:53
    
I will +1 when he adds info about results of his experiment. – Tomáš Zato Nov 5 '15 at 15:11

When disk space is running out on a system disk, may it be on a server or a client, there are certain things to clean out. One of them being the %SYSTEMDRIVE%\Windows\Installer folder. You cannot under any circumstances delete files from this folder manually as this not only may but most likely will break software that is installed using MSI files, or Windows Installer files.

The %SYSTEMDRIVE%\Windows\Installer folder is a cache for installation files and patches (MSP files) and removing those will cause you to not being able to repair or uninstall applications, and in some cases not removing patches or applying new patches to software. In the event when you actually did delete this cache you can rebuild the files you need manually by extracting the files from original installation media, from patch packages etc but this is a time consuming and not that easy task to accomplish.

Andreas Stenhall, MVP Windows Expert ITPRO Ref.: http://www.theexperienceblog.com/2009/05/16/how-to-clean-out-windowsinstaller-folder-correctly/

You may try to make some SAFE cleaup with this MS Fix It utility: Diagnose and fix program installing and uninstalling problems automatically

share|improve this answer

Make a junction! [1][2]

  1. Start a command prompt as administrator. [3]
  2. Take ownership of installer directory and all its files:

    takeown /f "C:\Windows\Installer"
    takeown /f "C:\Windows\Installer\*"
    
  3. Move C:\Windows\Installer to a new spacious drive, let's say E:. For convenience, it's better to create a subfolder to gather all the future junctions in one place, e.g. E:\Win7-Junctions, so the new path will be E:\Win7-Junctions\Installer. Cut-paste from Windows Explorer should be enough to move the installer folder.
  4. Make sure that C:\Windows\Installer is really gone and that all files have been moved to E:\Win7-Junctions\Installer.
  5. Create the junction:

    mklink /j "C:\Windows\Installer" "E:\Win7-Junctions\Installer"
    

    The syntax is:

    mklink /j [destination] [source]
    
  6. Verify that the junction works by creating a small text file in E:\Win7-Junctions\Installer and seeing it materializing in C:\Windows\Installer as well.

  7. Done. Check within "Add or remove programs" that installers are still working (Office is a good candidate to start with).

A word of warn, as stated in this Microsoft answer:

It is never suggested to move the operating system core components and files to a drive other than the operating system drive. Because they will cause instabilities in the operating system files.

Run this commands on your risk, Microsoft cannot guarantee any problems resulting from this can be solved.

Given that having constantly 0 bytes of disk space was indeed causing instabilities to the OS (and its users) and that Microsoft couldn't guarantee that any ordinary problem they created could be solved at all in a reasonable way, I went on with this procedure and found no significant drawbacks until now.

share|improve this answer
1  
I've done this on a couple of old Windows 2003 servers without problem. – David Dec 31 '15 at 1:10
    
I’ll have to strongly advice against doing this. Should Windows (caused by an update or whatnot) ever decide to restore the directory, things will probably be fubared and you’ll have to reinstall Windows. At least it won’t kill Windows outright. – Daniel B Dec 31 '15 at 1:54
    
@DanielB: Do you have any evidence that a Windows update should bother checking if C:\Windows\Installer is a junction, then wipe its whole content for no apparent reason and create a blank directory or you're just generally scared about the lack of transparency and "common sense" about the processes happening internally inside Windows OSes that make people think "hey, it can strike anywhere, it's better if I don't mess with obscure components (many) and let minor problems alone"? – Avio Dec 31 '15 at 12:56
    
No. I once moved Visual Studio to another partition using a junction. An update then somehow deleted that junction and put an (incomplete) directory in its place. Then, I had to reinstall Windows, because this could not be repaired. Incidentally, the VS installer is a MSI installer. – Daniel B Dec 31 '15 at 14:41

You an always use a program like CCleaner to clean up the system.

I just reclaimed over a gig of disk space!

share|improve this answer
1  
This is true but irrelevant. – Tomáš Zato Nov 5 '15 at 15:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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