# How can I free up drive space from the Windows installer folder without killing Windows?

On my SSD machine, the C:\Windows\Installer folder is massive and takes up about 15% of my total disk space.

Is there a way to clean up that folder without killing Windows 8.1/10? Tucking away the installers on the OS partition seems wasteful.

• I had the problem in Windows 8, and the temporary solution was to upgrade to 8.1 (I had 20+ G free up!). But the problem crept up again, with the continual patching of 8.1... This is an annoying problem from Windows since XP. Apr 22, 2014 at 21:02
• Actually, those aren't Windows installers in that folder. It's basically all the stuff that Windows needs to run different programs and code versions. Apr 22, 2014 at 22:00
• Are you kidding me? On my machine, this folder alone takes up over 25% of the disk space (20 GB / 80GB) allocated to the boot volume. Win 2008 R2. Nov 6, 2015 at 15:13
• You happy guy! On my system the Installer directory takes 50% of the 95 GB HDD. Microsoft is not acting here like the biggest software company in the world! Aug 10, 2017 at 9:03
• It is almost 2018, we have windows 10 now and it gets 46 GB off the disk for the very same thing :/ some things never change.
– mcy
Dec 11, 2017 at 13:18

I created "PatchCleaner" to clean the windows installer directory of all orphaned files in one easy click. If you don't trust the app to do the right thing, use the move feature to put them somewhere safe in case you need them back in the future. I have run it on multiple machines and saved up to 15Gb of space :-)

Run PatchCleaner after windows updates to find newly orphaned files.

I recommend you use the Move action, and move the orphaned patches to external storage, just to be safe

PatchCleaner @ HomeDev

Known Issues (full details on website)

NOTE: as @ Feb-2016 version 1.4.1.0 is out that has a fix to allow customisable filters to exclude adobe reader from being incorrectly detected.

• Magic :-). Windows actually keeps a list of known patches that it needs, that can be accessed via WMI calls. I compare this known list against what is actually in the c:\windows\installer directory and anything in the folder that is not in the list is no longer required. I have successfully run this an updated with the lastest windows updates from a few days ago and they all installed successfully. You will get errors if patchcleaner has done something wrong. I would recommend using the move action until you are happy that the program is doing the right thing. Jun 12, 2015 at 10:13
• Great tool, really liked it, works seamlessly :) Jul 15, 2015 at 8:35
• Do you think it would be possible to create a portable version of this tool?
– RedX
Dec 9, 2015 at 7:59
• Recovered 30.44 GB. Thanks for the tool! Would be nice if it was libre software; it would have eased the trust question ;) Jul 17, 2017 at 19:10
• why this tool isn't popular. why Ccleaner isn't including it to their product? Try to sell it to them and make some money man Mar 16, 2019 at 12:46

This seems to have worked for me. This is a simplified set of instructions from http://www.kavoir.com/2012/07/how-to-free-up-c-drive-disk-space-in-windows-7-easy.html

• Make sure no installations are running on your machine (there's probably a formal way to do this, but I'm not sure how).
• Copy using Windows explorer C:\Windows\Installer to another disk, e.g., D:\C_DRIVE\Windows\Installer -- note: Windows\Installer is a system folder and thus invisible in Windows 8.1. You have to tweak your account to make it visible to use Explorer to make the copy. Google will help you find out how to do that.
• Make a backup copy of C:\Windows\Installer
• Type the following commands in a cmd.exe window running as Administrator:

rmdir /s /q C:\Windows\Installer

• Windows may not let you to delete the installer directory, because some process are using some files within this directory:

C:\Windows\Installer\{some files}.msi - The process cannot access the file because it is being used by another process.


In this case you can use this link and use Process Explorer to find and stop the process which is restricting the rmdir command.

### Verification

As a verification, I ran a "repair" of my Microsoft Visio Professional 2013 install (took 4 minutes to process). This completed successfully. Windows update (with reboots) also ran successfully after making the above changes. I will write back if anything doesn't work.

• Wouldn't it be better if you first moved "C:\Windows\Installer" to "D:\C_DRIVE\Windows\Installer" and then ran mklink? Feb 24, 2015 at 11:02
• @MladenB. Using move (as opposed to copy then a recursive rmdir) might seem better. The original instructions I cited mention that removing the files can be complicated because you might have to take ownership. I've had to do that before in Windows and it's annoying when there are a lot of files. In such cases, the copy will complete successfully the first time, then you just have to make the rmdir work. For C:\Windows\Installer it probably doesn't make a difference, but the cited article speaks of other directories that can be relocated onto a separate drive. May 10, 2015 at 11:39
• 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. I had on my SSD (the only disk on the notebook) 52GB in C:\WINDOWS\Installer folder which will be only 41GB after the simple compression.
– Oleg
May 18, 2015 at 9:07
• There's an interesting approach discussed here: blogs.msdn.com/b/heaths/archive/2014/02/11/… See some of the comments for other alternatives, including a script that does a lot. May 21, 2015 at 20:20
• @Fuhrmanator With my Windows 7, I had to save and restore the original the permissions afterwards. Before moving: icacls C:\WindowsInstaller /save Installer.acl After moving: icacls D:\C_DRIVE\Windows\Installer /restore Installer.acl. Otherwise installers would not be able to access the directory and report an error 1632. Jul 22, 2016 at 7:40

You can compress the folder. You will regain between 10 and 20% of the space.

1. Enable "Show system files" in Explorer options
2. Right-click the installer folder
3. Properties
5. On the new dialog, select 'Compress'
6. Click OK
7. Apply for all files and folder
• best method that is perfectly safe. it reduced my folder by 2gb from 12gb Jun 14, 2015 at 6:14
• To view C:\Windows\Installer folder, uncheck the Hide protected operating system files option in the folder options. Dec 21, 2015 at 12:54
• Or just browse directly to it and right-click in the empty space. Oct 17, 2016 at 12:43
• I found this answer really useful: after enabling compression my "Installer" folder shrinked from 46.5GB to 38.9GB (the compression process took about 1 hour) Dec 28, 2016 at 12:00
• That's COMPACT /C /S:C:\Windows\Installer. Feb 7, 2017 at 21:40

Sometimes $patchcache$ consumes a great deal of "Installer" folder. You can check how big is your "C:\Windows\Installer\$PatchCache$" folder (mine was 6GB after 1.5 years).

Basically it boils down to "If you have original installers, then you could delete it".

rmdir /q /s "C:\WINDOWS\Installer\$PatchCache$" (as admin of course)

• Nice one, I install almost entirely from physical installers, so this was a good 5gb out of my problem! Thanks x3 Sep 25, 2015 at 14:36
• For me, that's 32GB of the 37GB in the Installer directory. Good pointer. Feb 26, 2019 at 0:02
• Note: this folder can't be seen by all commands from command prompt, dir "C:\Windows\Installer\$PatchCache$" yields file not found. It works fine from Explorer though, explorer "C:\Windows\Installer\$PatchCache$". Mar 15 at 18:25

There is no official way to kill it. You can use a link to move it to a HDD if you have one.

• I've read from several users this does not work: bitsum.com/junctionmaster.php#comment-1127491034 "The problem is, msiexec (apparently) ignores the junction, and manually creates C:\Windows\Installer. This 1) removes the junction, and 2) completely deletes the contents of the target directory." Apr 22, 2014 at 18:33
• @Fuhrmanator I used schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html and it works for me. Apr 23, 2014 at 4:09
• On my previous laptop I had a smallish SSD and larger HDD. I moved it all to the HDD and created a link. Worked perfectly. (Win10 64bit) Oct 6, 2016 at 13:35

## How to safely(*) clear disk space on Windows 10(**)

(*) Believed to be safe but no cast-iron guarantee - please only follow at your own risk.

(**) Targeting Windows 10 but similar steps may apply to other versions of Windows.

2. Run Disk Cleanup (e.g. by typing "clean" in the Windows start screen and selecting "Free up disk space by deleting unnecessary files"). Select the drive to be cleaned. Click on "Clean up system files" (and enter credentials if required). Select the drive to be cleaned. Select the option to clear system files.
3. Open Configuration Manager Properties (e.g. by typing "config" in the Windows start screen and selecting "Configuration Manager"). Select the Cache tab. Click on "Configure Settings" (and enter credentials if required). Click on "Delete Files..." Tick the "Delete persisted cache content" checkbox and click on "Yes".
4. Download, install and run Treesize Free. Scan the relevant drive and then manually delete any of the larger folders or files that can be deleted (applying the necessary caution).
5. Open File Explorer and navigate to the Windows temp folder (e.g. C:\Windows\Temp). Select all files and folders and then choose to hard-delete them by pressing SHIFT+DEL (you may be required to enter admin credentials). Then choose to skip all files that cannot be deleted because they are in use.

You can try a junction by copying the files to the new drive, then renaming the old installer folder temporarily, creating a junction from the default folder to the new. Then test things for a bit before deleting the renamed installer folder. Maybe install a bigger more complex program like visual studio, or adobe Photoshop, then uninstall it just to make sure all is well. But be forewarned, if anything goes wrong, you might not be able to install or re-install programs. Been there, done that. :)

• superuser.com/questions/707767/… Jul 17, 2017 at 19:11
• @ivan_pozdeev a junction is different than a hard link. I use a small program called junction.exe to make it work from docs.microsoft.com/en-us/sysinternals/downloads/junction Oct 12, 2017 at 4:41
• Reciting the comment on the link: WARNING! This wouldn't work in XP. I once tried and made C:\Windows\Installer a junction point, and msiexec broke it and recreated the folder anew. Oct 12, 2017 at 10:01
• @ivan_pozdeev I have to admit, my memory is foggy now so I will definitely take your word for it! I seem to remember doing this originally on XP though and it working for and extended period of time (yrs). But I'd believe you first! Oct 12, 2017 at 14:51

The best solution is to use Windows Installer CleanUp Utility.

https://technet.microsoft.com/en-us/library/2008.08.utilityspotlight.aspx

• Welcome to SU and thanks for the contribution. Just a heads up, SU gets a lot of spam, and it typically reads like your answer. It's a safe bet you're not a spammer, given your history on SO, but link-only product recommendations attract downvotes and are usually deleted. Good guidance here on recommending software. Sep 26, 2015 at 23:49