Can you safely delete files in the %windir%Installer directory?
Along the same lines as removing items from the Windows component store to save space, we have recently seen a couple of questions come in about the Windows\Installer directory. This is a hidden system directory; it is used by the Windows Installer service to cache installer data files for various applications. Over time, this directory will grow and can eventually take up an amount of space that might cause pressure on thinly provisioned storage, such as virtual hard disks.
So, the question usually asked is: Can I safely remove the files in this directory? The answer is flatly: No. So let's talk about why this is a bad idea.
First, it is not supported. If you remove files from this directory and have issues, you may need to reinstall the application to get back to a good state. Therefore, that would suck for both you and the engineer that needs to deliver that message.
Second is the overall idea that you really should not remove items in the Windows directory. We build and test our software based on the existence of specific files and directories. When those files and directories dont exist, bad things can and will happen. However, that is a generalization that usually upsets many people so let's be more specific. This particular directories job is to act as a cache location for Windows installer based applications. It holds stripped down versions of the Windows installer data files. During application install, update of the application or application removal, this directory is used by the application to confirm the existence of previously installed items to determine the next steps the installer needs to take. The files are different from machine to machine, so if you expect to delete the files in the directory and then copy them over from another machine, that would be incorrect. Removing items from here could cause you to have application crashes, or worse, require the reinstallation and patching of the application.
The proper way to alleviate space pressure in this directory is to uninstall any unneeded applications.
I hope that this makes sense and you can see why removing files from this directory can cause you unneeded pain. Overall, this is similar to the advice I have given in the past when it comes to removing items from the component store...just don't do it. Plan your future space requirements based on your operating system and application needs and you can alleviate many of these types of issues before they occur.
--Joseph
Comments
Anonymous
January 01, 2003
@Fitz; Use takeown.exe to take ownership of the file/directory and delete it. Typical "joscon disclosure" rules apply :)Anonymous
January 01, 2003
@Andre; Ideally, the way to reduce the foldersize is to increase your disk space. We really dont want people removing or manipulating items in that directory.Anonymous
January 01, 2003
Unfortunately, I wont be of much help here. The only supported method of removing files from the directory is uninstalling the application that populated the directory.Anonymous
January 01, 2003
Good call Pronichkin, I've added that to the blog. Thanks!Anonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
Tell me how you really feel Andre :)Anonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
@Ben, Thanks for the feedback. We actually do provide guidance for this and its that is, its recommended you allocate 40GB for storage for the OS volume. In Windows 8/Server 2012, there are other things you can do using Features on Demand to remove some features to control disk space. Let me know if you have any other questions. --JosephAnonymous
January 01, 2003
Interesting set of posts Al, thanks for sharing your thoughts.Anonymous
January 01, 2003
@Mint, my answer directly above is unfortunately the only supported method for removing files from the directoryAnonymous
January 01, 2003
There are several reasons. Moving the folder wouldn't update the entry points in the registry for all of the application uninstallers who have written there. It would also create an administrative nightmare as you'd have to manipulate it each time and application or update was installed. Additionally, you'd more than likely break future application servicing as many applications write to it as a well known directory, if an application update required a file to be in the directory and it wasn't there, it would fail.Anonymous
January 01, 2003
If you can, uninstall and reinstall Office is probably your best option at this point Venkatesh.Anonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
"So, I'll bring this up." Thanks. The problem with using the m/d/y format is the ambiguity of it, not so much the mental translation into the big-endian-like ISO format. Users with non-m/d/y locales must be constantly seeing dates in various contexts and having to ask themselves if the date is being formatted to their locale, or not. Then there are the inconsistencies found within Windows. Ex: Xcopy /D:m-d-y and Robocopy /min|maxlad:YYYY-MM-DD. I vaguely recall that version numbers were added to the DriverVer key in inf files because of mistakes using the m/d/y date format by non-US programmers. Easy to criticize but what seems a bit odd is why a software company would not prefer an easily sortable format like y-m-d. As for presentation, i'd be happy just to see YYYY-MM-DD printed in grey, directly below the publishing date, and, just beneath 'KB Articles:'; Superseeded by: <KB####### (<Update Name>) | Nothing> "So when you're trying to determine if something applies to something else, look at the versions of the files you have vs. the files you want to apply. If the file to be applied is greater, thats all that matters." Ok, but that will require a little more investigation than just referring to the date, but point taken. I guess a point to note is that an update released just prior to a service pack might not be included in the SP yet have an earlier date than the SP published date. Perhaps instead of or in addition to the published date, the date of most-recent-update-included should be printed on the download page? But that is probably to ignore what you said about ignoring dates and only going on version numbers. Regardless, if version numbers are what should be referred to in determining update applicability, that might be making the case for including something like the filever command, inbox. One more bit of info that might be good to include in KB Support and download pages are references to hotfixes and updates to the update in question. Two good examples:
- Windows Installer 4.5 Hotfix KB958655 support.microsoft.com/.../958655 Referred to on the Visual Studio Administrator Guide page @ msdn.microsoft.com/.../ee225238.aspx but not referred to on either the KB article or download page for WI 4.5.
- Platform Update Supplement for Windows Vista and for Windows Server 2008 support.microsoft.com/.../2117917 Not mentioned on the 'Description of the Windows Graphics, Imaging, and XPS Library' KB page, equivalent download page, or in the 'Description of the Platform Update for Windows Server 2008 and the Platform Update for Windows Vista' page @ support.microsoft.com/.../971644 Any sort of non-replacing update to an update/hotfix should be referenced in a revision to the 'parent' update page.
Anonymous
January 01, 2003
All good feedback Drew, thanks!Anonymous
January 01, 2003
@xp I know you hate the servicing stack and CBS in general so I wont go too much into this, but....I can tell you for a fact that the number of issues we see that are update related are much smaller than we ever saw with XP. There are goods and bads to both systems and both systems have failed in some form or fashion. But, CBS is more reliable that update.exe. --JosephAnonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
Drew; What I mean by that statement is that the file date/date modified should never be used for determining the state of a file on the machine. Many things can change those dates. The file version is the only way to accurately determine the state of a file on the system because thats usually only something the OS is going to modify. --JosephAnonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
No worries, I got rid of the dupe. As for the installer files, no you shouldn't delete them. Keep in mind that the date on some of those files isn't a reflection of when they were installed but most likely when the developer of that cache created the files.Anonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
and removing older updates! But it still happens that files are left after removing software. Why can't you provide a simple software which checks if the MSP/MSI is still referenced or not? This software: www.kztechs.com/wicleanup only works for 32Bit Windows, the results are wrong for 64Bit Windows. I hate this folder, it is 14GB on my system :( WinSxS is only the half (7GB). Microsoft Installer is one of the worst things ever made. Slow, uses too much space in this folder and often causes failures.Anonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
@Nab; Possibly. We do have a DISM PowerShell module in Win8/2012 already, so the functionality has moved there. But we've also expanded DISM in 2012 to include things like the IMAGEX functionality of the WAIK. I guess time we'll tell :)Anonymous
January 01, 2003
Looks good Drew, I'll shoot this around internally and see what others think of the idea.Anonymous
January 01, 2003
I think CBS will be used until NTFS is dead in Windows 9/10 when ReFS (which doesn't support hardlinks from what I read on the b8 blog) comes to the client. Fill GOOD Feedback (not your troll posts) with the Feedback tool to requrst changes. Most of my WinSxS issues I discussed with 20MSFT employess over several beta tests are now fixed in Windows 8. And Win8 lets you remove files from WinSxS folder (DISM /Disable-Feature /Featurename:<name> /REMOVE). So disable the features you don't like and the files are removed from WinSxS. This reduces the size.Anonymous
January 01, 2003
BTW - I came up with an idea of how to improve windows installer and programs in general Instead of pestering the whole OS with files in every corner of the system, why not take advantage of VHD's ? (or similar concept) - So when a program is installed, it creates a VHD files which contains everything - isolated and easy to move or get rid of. i believe that OSX has been using such a construct for many years, where programs are simply 'folders' that are executable. do you have any comments of this idea ?Anonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
Hi, I delated the files in Windows Installer, now I lost Icons of all the applications and also I cannot repair Microsoft Office 2010. Is there any way to address the problem?Anonymous
January 01, 2003
The Menu:
- Effective and reliable
- Fast and efficient
- Free Your choice: Any two.
Anonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
The honest answer here is "I don't know" because we don't test it to work in that fashion. It may work just fine or it might work intermittently for different applications, it all depends on what the application stores in the folder and how it's linked in the file system, registry, etc.Anonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
@joscon i have gone through the entire.. forum.. liked the discussion now i am back to square one.. now there are installer files which are way back 2011.. is it wise to delete them.. or is there nay tool which we can use to remove them.. (sorry about the double post)Anonymous
January 01, 2003
I simply hate the Windows installer. Installing Sp1 for VS2010 takes so much time. its time for a new format which also supports offline servicing like MSU updates. Installer is from Office 97 time frame.Anonymous
January 01, 2003
@Montago; The problems you're seeing after deleting the Installer files is exactly why we don't recommend doing so, there are countless problems that can occur if you do so. As for your idea, we have a modular solution in Windows 8/Server 2012 that allows for feature by feature removal already. It doesn't apply to the Installer directory but it does allow for pruning of targeted payloads.Anonymous
January 01, 2003
Thanks. I suppose the only field i've missed in the above list is something for subordinate updates (for want of a better term). "Dates have been used incorrectly in servicing for years (since NT) and its always been a pet peeve of mine." Could you elaborate on this? Who or what has used dates incorrectly? I actually like dates as version numbers, in general. For example, i would prefer if the Windows build number was a timestamp, and then for the full Windows version number to be formatted like this: Major.Minor.SvcPack#.YYYYMMDDHHMM It would also be helpful if this became a machine environment variable, say 'OSVersion'. (The 'ver' command is not outputting anything that a single envar couldn't.)Anonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
Can you? Yes. Should you? No.Anonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
I don't see the core issue of slow servicing/speed/performance addressed in Windows 8 Beta. I am not trolling but expecting a very realistic scenario here - low power tablets taking hours and hours to install a service pack and post SP-updates.Anonymous
January 01, 2003
@NickViz in Win8 you can detect and remove replace updates with DISM and disk cleanup: www.msfn.org/.../page__view__findpost__p__1015509Anonymous
January 01, 2003
I have let XP go, I use Windows 7 but I will keep reminding Microsoft that they destroyed the speed, ease of use, simplicity and lightweightness of XP servicing in the redesign for "reliability" of Vista/7/8. I don't expect anything exciting from Windows 8 because MS has designed the servicing stack in a way that performance, disk space and ease of use are all last priorities. Even to slipstream hotfixes, the earlier simple /integrate switch is replaced by some zombie multi-step operation involving WAIK, extraction, learning of complex DISM syntax and what not.Anonymous
January 01, 2003
Not sure I understand the question. If you're asking if the folder was corrupted by malware due to infection, you'd be best to reinstall and update any applications that aren't working.Anonymous
January 01, 2003
@Drew; Sure, I'll do something on SoftwareDist here in the near future. To both of you, I understand XPs point and I think he would counter that XP's ability to integrate service packs with a single switch was invaluable to him. You're actually both right. The new servicing model is not perfect. I would challenge that no piece of software is. That being said, I do prefer the new model and its not just because I work here. XP lacked the checks and balances that we now have in the current model and those balances provide for a lot more mutability and robustness when it comes to system stability --JosephAnonymous
January 01, 2003
@xpclient; At some point you're going to have to let WinXP die <G>. I understand your points above though and I will speak to the changes in Windows 8 servicing when the time comes. --JosephAnonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
Just to add, the proper way to reduce the space consumed by this directory is obviously to remove unnecessary applications.Anonymous
January 01, 2003
Joseph,
You should really get your programmers to get a clear division between OS and Application files. What are setup/uninstall information files of applications doing in the Windowswhatever directory??
If an application asks where to install, it should be confined in that directory only!
Same for 3rd party drivers.
An application or driver (and not both in the same) should have 1 directory, and if an uninstall has not removed all files, if windows gets the message that the application has been successfully uninstalled, why doesn't Windows clean-up after it if the application didn't do that properly? Same with registry information.
Give user the option to let Windows remove old versions of a superseded update, and in corporate environments, defined by GPO.
Maybe off-topic, but why is there still such a thing as Program Files and Program Files (x86)... It should be Program FilesApplication or Program FilesApplication (x86) if that distinction is still necessary... Even in Windows 10! But they should have done this from the beginning!
So, I suppose my message to you is... consolidate, consolidate, consolidate...
PCHEALTH, ModemLogs, LiveKernelReports, ... all logs(?) -> Eventlogs
Temp, msdownld.tmp, SchCache, all temporary files that can be deleted as soon as not anymore in use -> WindowsTemp
And so on. Get your programmers to write a Readme.1st in every folder of Windows and other OS folders to explain what this folder is, and why you can't delete anything from it, and we'll see how quickly they can consolidate.
In short, the Windows folder is one-big-mess. (to not even start on capitalization consistency).Anonymous
January 01, 2003
Thanks for the feedback and I totally understand where you're coming from. Many of the things you've described above fall into the app compat category. So many people use our products and have across such a long time frame that removing things such as Program Files x86 would cause many applications to simply stop working. While it would be nice if every application developer wrote to Program Files (and many do these days), those applications which people love using but are no longer under active development, also should still work and that's what its there for.
As for things like the Installer directory, that's still somewhat of a mystery to me because my team doesn't really delve into that code very often. Trust me when I say that on my team, disk footprint is a very real consideration and we're very conscious of how decisions impact users. I know other teams feel the same way. Keep providing feedback and we'll keep looking for solutions would be my best compromise here.Anonymous
January 18, 2012
For the record, I have seen situations where the Installer directory contains multiple (identical) copies of very large files; if I remember correctly, each time a particular installation failed it left behind an additional copy. So there may be situations where the administrator has to delete files manually.Anonymous
February 04, 2012
The comment has been removedAnonymous
February 09, 2012
To each his own, I do not agree with any of your arguments but I hope a future version of Windows will be engineered for super fast, bloat free and simplified servicing. Speed, less disk space consumption over time and simple design will only benefit the product.Anonymous
May 03, 2012
The comment has been removedAnonymous
July 13, 2012
The comment has been removedAnonymous
August 21, 2012
Just to point something i found interesting, i think someone said "DISM is here to stay". Well i think it will be deprecated one day for Powershell cmdlets - DISM syntax is already similar to Powershell cmdlets (so need to learn the syntax again) , Powershell is now include in WinPE 4.0 etc... And i think it is a very good thing if Microsoft start to replace those hundred of Windows utilities by a set of Powershell cmdlets. In Windows 8 R2 or WIndows 9 maybe...Anonymous
September 20, 2012
Can i delete some of the item from the Installer folder or not? if yes, how?Anonymous
October 01, 2012
Hi, I delated the files in Windows Installer, now I lost Icons of all the applications and also I cannot repair Microsoft Office 2010. Is there any way to address the problem?Anonymous
November 13, 2012
Hi Jason. Thanks for your answer for this question. Regarding your suggestion that we "Plan your future space requirements based on your operating system and application needs .", that is simply not possible as long as Microsoft constantly changes the way Microsoft uses user's computer drives without providing either useful information or advance notice regarding the space that Microsoft is going to take up on users hard drives. I know that if falls on deaf ears but - again - some sensitivity to the providing of user's control over user's systems would be most welcome.Anonymous
January 17, 2013
is there any problem with using a JUNCTION so that the installer files can be moved to a different (local) drive? ie C:WindowsInstaller -> D:WindowsInstaller ?Anonymous
January 20, 2013
Hi all, I still don't understand, why I can't remove superseded files after I made sure that update / fix works properly. I also don't understand why should I call DISM /Disable-Feature command with different features and why Windows can't remove disabled features files itself. I can't understand why many people tells you guys that WinSxS/installer folders consumes enormous amount of space and your reply - buy bigger disk. I also don't understand that if you know that these folders are big and they are going to be bigger - why on question to place them on other volume the answer is "To be honest, I don't know.". In many ways I see now that MS denies any feedback from their customers. "We know better" - that's the answer.Anonymous
January 20, 2013
And one more - why "C:WindowsSoftwareDistributionDownload" folder is not cleaned up after all updates are installed???Anonymous
January 22, 2013
The comment has been removedAnonymous
January 23, 2013
The comment has been removedAnonymous
February 08, 2013
Hi Joscon, what if the folder was a target for infections by one spyware, what should we do ???Anonymous
March 01, 2013
Hi, I have a situation with the Windows Installer file. It's one specific file, "73528ca", and it freezes the computer everytime I do anything to it, and I end up having to restart it either way. I've tried deleting it, but it says "this file is open in another application". When I try deleting through command prompt, it says the directory doesn't exist. Now I know you may say just to leave the file alone if it keeps freezing everything, but I don't like the look of it and plus it does it sometimes even when I'm not playing with it. Idk if you'll reply, but I do need some assistance. Thanks!Anonymous
March 15, 2013
The comment has been removedAnonymous
March 15, 2013
(1 of 2) Hi. The best solution to the “%windir%Installer” eating up gigs and teras of disk space is to buy OSX, Android, or Linux!!! It is useless to keep pressing “Joscon”. What do you expect him to say?! The only way to make windows think again is to stop buying it. The problem is clear – they are a monopoly and they don’t give a d. . . After a backup I deleted the complete contents of the installer folder and apart of the “icons” problem (which is easily resolvable with total commanders LNK editing plugin) no NO OTHER soft apart of Microsoft’s office etc. . . had any kind of problem. Not Adobe, not Corel, not several burning progs – Nero, Roxio… , several video and audio editing softs, (even the big pros like AVID, MAGIX NUENDO) not one of them had any kind of issue. NOT ONE OF THEM. Everything worked flawlessly. I work with them day in day out and have tested this on several different systems. Another similar solution is to zip your installer folder to a safe place some ware else and restore it to the original place once you decide to reinstall or uninstall apps because some softs (only “SOME” programs) leave their uninstallers here instead of taking them to their program folder. Well, as they say – “YOU WILL KNOW THEM BY THEIR FRUITS” (Matthew). I think MS knows very well what they are up to – why else name the folders 4975138478995. . . why else hide behind anonymous sets of numbers. Who would want to put his name to the mess he left behind . . .? Old MS programmers, who knew what they were doing, called their windows folder – windows and their system folder system. Good and bad work could be determined at a glance.Anonymous
April 01, 2013
Why can't someone just move the folder to another location, like to another partition or HD ? Since it is always growing it will eventually be a problem one day. Is there a way to tell the system where to look for the installer folder when it is needed?Anonymous
April 15, 2013
The comment has been removedAnonymous
April 30, 2013
Overall WIn7 has been a good experience for me with one exception. SIZE ON THE DRIVE. OMG does win7 grow and grow in size far faster than anything that can be considered reasonable. My OS drive is a 120GB SSD. My winsxs and installer folders together are 25GB. The article says uninstall unused programs to reduce the installer folder size but come on. An OS should not grow like this. I have been a computer user since commodore 64 was new. I have learned not to install stuff I wont use after upgrading to my first IBM with a hard drive. I only have software on the computer that I use regularly. No more (less even) than on previous computers. "Just uninstall unused programs" is a very poor answer to this problem. WINDOWS DEVELOPERS NEED TO REALIZE THAT THE SIZE OF THE WINDOWS FOLDER IS GROWING UNACCEPTABLY FAST COMPARED TO THE RATE OF HARD DRIVE SIZE GROWTH. I not talking about the growth of the max size hard drive on the market but the growth of a normal size I can afford at the time of new computer purchase. I wonder about the future of windows. Will I need to give-up on SSD to run Win8 because of the size requirements? The windows7 system requirements page says the min space is 20GB for 64bit. I dare anyone to install Windows 7 on a 20GB hard drive. If you installed no other software you might be able to run windows update for a few months before running out of room. Instead of implying that users are installing useless software, win developers should address the space wasting issues in windows. Windows 98 was great, Windows XP was great - windows has been going downhill since. If newer software could be run with win 98 I would go back to it.Anonymous
May 05, 2013
I realize you probably can't discuss this, but with regards to the space taken up by CBS another Windows 7 service pack would be very helpful. :-) Other folks: do keep in mind that when the servicing stack was being designed, SSDs didn't even exist. At the time, spending disk space to gain reliability really must have seemed like a no-brainer!Anonymous
August 16, 2013
If I was to copy all of the data from this folder onto an external hard drive (considering my SSD drive has 10% of it's capacity used up by this folder) And if programs start being silly, copy across what is needed? Would the error message that appears say what was missing? I'm struggling, after paying a small fortune for an SSD that it is useless for saving documents and photos on after installing my programs and Windows 7 :(Anonymous
September 24, 2013
Well I decided to shrink that lousy folder a little, so I started to uninstall anything I thought I wouldn't want anymore, and actually went on to uninstall almost everything I had, and now I have that same folder with the same size, or not to lie, 600M smaller than the 6G it was the day first. So, any clues?Anonymous
September 24, 2013
Well there's like a millions files in there, and I can't find a way to see which one belongs to which application. This has been all over my mind for the past ten days or so, since I found out there is such folder, and I have been searching almost the entire internet (if we take that to be the first two or three pages of google) and found nothing helpful. Is there some tools that would clean up that folder a little? I've seen and actually tried those somehow obsolete ones, their names were like msuuc.exe or mszip.exe or something, and none worked. Maybe a little help is on the way? :desperateAnonymous
October 04, 2013
There is something wrong with this folder. My client has a 35gb HDD and there is 22GB of files in the Installer folder! She does not have more than 5gb of programs on the machine and add 6gb for Windows. There has to be a way to safely delete the bulk of those 22GB files that is not needed.Anonymous
April 11, 2015
Dear Pronichkin,
While I understand your condescending statement about uninstalling applications (which was lauded by Mr Microsoft), here's what an IT person older than 10 years old would say.
Over a few years, a 128gb disk will find that several folders have grown exponentially by hoarding every instance of driver files it encounters. You may find that between Windows, WindowsSxS, WindowsInstaller and WindowsSystem32DriverStore that the overwhelming majority of your disk is NOT used by applications, but a rogue operating system that has no concept of data management.
In this instance, you have two options, 1) get a decent OS (as this hoarding behaviour is considered NORMAL and LAUDED by Microsoft staff), or stop listening to arrogant Microsoft staff and 10 year old wanna-be know it alls.
I'll leave the option up to you.Anonymous
May 06, 2015
What about Windows 10? My Installer is 26Gb, WinSxS is 7.5Gb. Will Windows 10 at least support moving them to another drive?