Is it safe to delete the $NtUninstallKBxxxxxx$ folders Example: C:\WINDOWS\$NtUninstallKB948881$
A number of people have asked this question. Most often in an attempt to reclaim some space on their hard drive. My standard answer is yes as outlined below.
The $NtUninstallKBxxxxxx$ folders and associated files in these folders are safe to remove, however once deleted you will no longer be able to un-install a patch or update that was associated with the deleted folder/files.
Now comes the big question Can I delete the folder named: $hf_mig$ And I respond with the answer below.
Warning: One folder you should not delete is: $hf_mig$ (and any folders that a part of/contained in $hf_mig$) It is a necessary folder for future updates See the "Notes" section near the bottom of the following KB article: http://support.microsoft.com/default.aspx?scid=kb;en-us;824994
Some Detail about the $hf_mig$ folder and sub-folders Basically what the note in Knowledge Base article implies is that when Windows is installing an update and that update contains an older version of a .dll file than what you currently are using (the newer version having been installed by an earlier update), Windows update will use the version of the.dll file which is located in one of the %windir%\$hf_mig$ sub-folders instead of the older version of the .dll that is part of the update your are currently in the process of installing.
This keeps you safe from ending up with an older version of a .dll on your PC. If you are interested if the inner workings of how the decision process of which version of a .dll file is made then read the paragraph titled “Branching” in the following Microsoft article: http://www.microsoft.com/technet/prodtechnol/windowsserver2003/deployment/winupdte.mspx
OK, so it’s it really safe to delete the $NtUninstallKBxxxxxx$ folders but not $hf_mig$ Yes, I’ve have run a series of tests with and without the folders being deleted. The test was conducted using an image backup (baseline backup) of my hard drive which I had made back in April 2007, so the last Windows Updates installed on the drive were Service Pack 2 and all updates after SP2 that were applicable up to and including April of that year.
The first test was made using the baseline image backup which contained all the $NtUninstallKBxxxxxx$ folders up to April of 2007 as mentioned above. I then went to the Windows Update site and using the ‘Custom’ option scanned my PC to see what updates were available from May of 2007 to and including May 2008. I then checked marked only those updates that I felt were relevant to my PC and proceeded to let Windows Update install the updates. No problems as all updates installed without errors. I them made another image backup of the hard drive (Backup A).
It’s time to delete those $NtUninstallKBxxxxxx$ folders I started by restoring the hard drive using the baseline backup. I then deleted all the $NtUninstallKBxxxxxx$ folders, leaving the $hf_mig$ folder on the drive. I then went to the Windows Update site and using the ‘Custom’ option scanned my PC to see what updates were available from May of 2007 to and including May 2008. I then checked marked only those updates that I felt were relevant to my PC (Note: did not include Service Pack 3 as part of the updates to install) and proceeded to let Windows Update install the updates. Again no problems as all updates installed without errors. I them made another image backup of the hard drive (Backup B).
Was there any difference in what was updated? My image backup software (Ghost version 10) allows me to selectively extract any folders and the files contained therein from the image file. So from the Backup A image file I extracted the Windows directory and all it contents along with the Program file and Documents and settings folders to a newly created folder named ‘Test1’ on my hard drive. Using Backup B image file I extracted the same set of folders to a second folder named ‘Test2’. Then using a file comparison utility that performs a five way (CRC check, file version, file size, Time/Date stamp and checks for missing files) to see if there are any differences between two files which have the same file name. The answer is, the results were the same with or without the $NtUninstallKBxxxxxx$ folders being on the hard drive. So yes it is safe to delete these folders.
How much drive space do I really get back by deleting the $NtUninstallKBxxxxxx$ folders! About 1.2GigaBytes and if you include the updates that have been installed since April of 2007 but before installing Service Pack 3 you could save as much or more then as 2GB. The exact amount of space reclaimed will vary from PC to PC depending on what applications are installed on your PC. For example, if you have one or more MS Office versions (2002, 2003 or 2007) installed, the number and size of the updates that have been installed on your PC will vary.
What about the file named $NTSevicePackUninstall$ Yes it’s safe to remove this folder, which is about 330MB after Service Pack 2 has been installed. If you have already installed Service Pack 3 then this folder may grow to over 600MB. Warning: Once you delete this folder you can no longer uninstall the service pack. So if you have just installed SP3 leave the folder named $NTSevicePackUninstall$ on the drive for a while until you are certain there are no problems that would make you wish you had not installed SP3. Again, once this folder is deleted you loose your ability to remove SP3 or the last service pack you installed (SP1 or SP2) on the PC.
Does installing Windows Service Pack 3 remove all the older $NtUninstallKBxxxxxx$ folders? No, they will still be on the hard drive.
Why not to use a registry cleaner after deleting these folders? In my case I usually leave the most recent 3 months of updates ($NtUninstallKBxxxxxx$ folders) installed by Windows Update just in case I need to remove an update that created more problems then it cured. If you choose like me to do the same and leave some on the drive and then use a registry cleaner, it will attempt to fix the uninstall shortcuts (now pointing to the non existent $NtUninstallKBxxxxxx$ folders that you have deleted) that the ‘Add or Remove programs’ control panel option relies on. The result of letting the registry cleaner automatically fix registry entries could be a shortcut that points to an update which you deleted and is no longer on your drive now pointing to a more recent and incorrect $NtUninstallKBxxxxxx$ folder’s uninstall file. If you then at a later point in time decided to uninstall a specific Windows update that you think is giving you problems and you forgot you deleted the update’s uninstall folder, you most likely will in fact remove the wrong update due to the butchered shortcut the registry cleaner created.
The correct way to Clean Up after removing the $NtUninstallKBxxxxxx$ folders Immediately after deleting the $NtUninstallKBxxxxxx$ folders, open the Control Panel, select Add or Remove programs, and remove the checkmark in the ‘Show Updates’ box. You will then now longer see the Windows updates just the applications you have installed.
There is a utility named: xp_remove_hotfix_backup.exe You can read more about what is does at Doug Knox’s web site. http://www.dougknox.com/xp/utils/xp_hotfix_backup.htm
Yes you could go into registry using regedit and manually delete the registry keys associated with the now deleted uninstall folders but I don’t recommend it and have not tried this as you could end up creating more problems than it's worth.
< Back
|