开源 工具可安全清理孤立的 Windows 安装程序文件并回收磁盘空间
English · 简体中文 · Русский · Español · العربية · 日本語 · Português (BR) · Polski · Türkçe · 한국어 · Français · Italiano · Deutsch · Bahasa Indonesia · Tiếng Việt · Українська · Nederlands
What's my line? I'm happy cleaning Windows
InstallerClean
An open-source tool to safely clean up C:\Windows\Installer, the hidden Windows folder that quietly eats your disk space.
Use it once in a blue moon. Maybe save some space. Move on, feeling clean.
C:\Windows\Installer, a hidden folder that fills up as you install and update software. After a quick scan it tells you whether you have any, shows more detail for the curious, and lets you move them somewhere else or delete them to free up space on your C: drive.C:\Windows\Installer taking up a lot of space and didn't know what was in there. In that case, InstallerClean is just what you need. It knows what's in those files with random-looking names like 9f05cba.msi and quickly tells you which ones you can safely remove.C:\Windows\Installer. It asks Windows Installer what's still needed, and reads the same records out of the registry as well. It offers a file only when nothing installed on the machine claims it, or a newer patch has replaced it and no program here could go back to the old one. Anything it can't get a straight answer about, it holds back. More below.There's a hidden folder on every Windows PC called C:\Windows\Installer. Every time you install software that uses the Windows Installer system, or apply a patch to Microsoft Office, Adobe Acrobat, Visual Studio or any other .msi-based application, a copy of that installer or .msp patch file goes into this folder, and stays there.
When a newer patch replaces an older one, both stay. So do the installers of software you uninstalled long ago. Disk Cleanup doesn't touch any of it, and neither does Storage Sense. DISM is for a different folder entirely. Over time, the folder grows: 1 GB, 5 GB, 20 GB, 50 GB. On machines with heavy MSI-using software (Acrobat is a frequent culprit), it can pass 100 GB.
These aren't temp files that come back on their own. They're genuine dead weight: old installers from software you uninstalled years ago and patches that have been replaced several times over. Once they're gone, they don't come back.
If you're looking for an easy way to free up disk space on Windows, this folder is a good place to start. InstallerClean finds the unneeded files and removes them safely.
If you've ever searched for help with this folder, you probably know how it goes. Someone with 180 GB in C:\Windows\Installer asks how to clean it. They're told to run Disk Cleanup. They try it. It clears 600 MB, none of it from that folder (because Disk Cleanup doesn't touch C:\Windows\Installer). The thread goes quiet.
"All of the threads I've found tend to recommend the same things which don't solve the problem, and then go dead."
Or they're told not to touch it at all. In one thread, someone with a 60 GB Installer folder was told "don't mess with it." When they asked what they should do instead, the reply was: "I just told you."
The standard advice confuses two different things. Deleting files at random stops you being able to update or uninstall any programs those files belonged to. Removing only the files that nothing on the machine claims, or that Windows records as replaced, doesn't. InstallerClean does the second.
C:\Windows\Installer for .msi and .msp filesInitial scan. This is very quick.
Results: how much is removable, how much has been left alone.
Details of the files that can go: the reason each one isn't needed, and what the file says about itself.
Details of the files left alone: the program Windows says each one belongs to, and what the file says about itself.
Confirmation before either action. Move backs the files up to a folder of your choice. Or delete them permanently.
The move running. To the same drive it's instant. To another drive, the more GB the longer it takes.
Done. Space reclaimed. Files backed up until you're satisfied all's well. Then delete the backup folder.
After scanning again. Nothing left to clean.
When Windows Installer installs a program it keeps a copy of the installer in C:\Windows\Installer, and when a patch is registered against a program it keeps a copy of that too. Those copies are what it works from when it repairs, updates or uninstalls the software later, which is why they stay there long after the installation has finished. Both kinds of copy end up in the folder: .msi installers; and .msp patches, which update a program you already have rather than replacing it.
InstallerClean offers a file for one of two reasons.
Orphaned means nothing on the machine claims the file. No installed product and no registered patch names it.
Superseded means Windows has recorded that a newer patch replaced this one, and has kept the file anyway. A patch is deleted only once every program it is registered to has been uninstalled, or the patch is removed from all of them. Being replaced by a newer one is neither of those, so the file stays. Adobe Acrobat works this way on Windows: its updates arrive as patches against a base installation rather than as fresh installers, so a machine that has had it a while can be holding several.
InstallerClean works the two out in opposite directions, and only the first involves looking in the folder at all.
Listing the folder. InstallerClean lists the .msi and .msp files sitting directly in C:\Windows\Installer. It does not go into the subfolders.
Reading the records, twice. It asks Windows Installer for every installed product and every registered patch, and for the cached file each one names, by calling the Windows Installer API in msi.dll. Then it reads the same records a second way, straight out of the registry, because the asking can come up short without saying so: Windows hands the records over one at a time until it says there are no more, and a run that stops at the third of two hundred looks exactly like one that reached the end. A registry key hands over its whole list of names at once, so a list that is short cannot look complete. Any product the registry names and the asking missed is then put back to Windows by name, one at a time. This second reading can only move a file onto the "still needed" side. There is no path by which it puts one on the list of files to remove.
Matching a record to its file. A record names its cached file as a path, and the same folder does not always get spelt the same way in them. So rather than trust the spelling, InstallerClean asks Windows where each recorded path really points, and compares that against the files it listed in the folder. Anything still unclaimed gets a second comparison that does not go through names at all: it opens the file and asks Windows to identify it, so that two different names for the same file are recognised as one file.
Records that cannot be matched. If Windows will not say where a recorded path points, or the file at the end of one cannot be identified, InstallerClean does not know which file that record was about, and any of the files it listed could be the one. The same follows if a program may have been installed more than once, because then it cannot tell which cached file belongs to which copy. In any of those cases it offers nothing it found by listing the folder that time. A record pointing at a file that has already gone is different: there is nothing left for it to have meant, so it cannot be about any of the files still in the folder.
Asking from the other end. An orphan is decided by an absence, and an absence can also mean the app failed to find the record. So before offering an .msi installer, InstallerClean opens the file, reads the product code the file itself carries, and asks Windows whether that product is installed. If it is, the file stays, whatever the rest of the scan found. That check can only take a file off the list. Nothing it can answer puts one on.
What decides an .msp patch. A patch is not opened and asked which program it belongs to. What settles it instead is that a patch registration names its cached file in two places: the patches registered against each product; and a single registry list of every patch registration on the machine. A patch is offered as an orphan only when neither of those names it.
Where a superseded patch differs. It goes through none of the above, because it is not an unclaimed file. Windows has a record of it, and t
暂无开放 Issues,或尚未同步最近议题。