Delete files inside $hf_mig$ ?

Discussion in 'Windows Update' started by Lady Dungeness, Jul 4, 2007.

  1. I've had SP2 and updates installed for a while and all is working well. I'd
    like to delete the folders inside the $hf_mig$ file. I've heard not to
    delete the $hf_mig$ folder itself. May I delete those folders without
    affecting my XP Home system?
     
    Lady Dungeness, Jul 4, 2007
    #1
    1. Advertisements

  2. Do not delete that folder. Leave it alone. It is a necessary folder for future updates
    etc.
    Description of the contents of Windows XP Service Pack 2 and Windows Server 2003 software
    update packages
    http://support.microsoft.com/default.aspx?scid=kb;en-us;824994
    %windir%\$hf_mig$ folder

    You can delete these update uninstall folders/files -
    Folders that have uninstall as part of the name (for example $NtUninstallKB282010$ which
    reside in C:\windows (hidden folders) are Window Hot Fix Update folders/files) can be
    safely deleted (providing you never wish to uninstall the updates). I would recommend
    leaving these folders for a period of at least a month to make sure the update is working
    correctly.

    These updates can be deleted individually or in multiples. To find out more about the
    update/s go to:
    http://support.microsoft.com/?kbid=XXXXXX
    NB: XXXXXX = the actual number not including the "Q" or "KB"

    Once you have deleted the uninstall folders/files, then go to Control Panel, Add/Remove
    Programs. Select the matching Windows Hotfix Title relating the update folder/file you
    have just deleted and select remove. You will get a Windows error. This is because you
    have deleted the uninstall folder/files. Just choose OK and the entry will be deleted from
    the Add/Remove Programs Listing.


    --
    ====================================
    TaurArian [MS-MVP] 2005-2008 - Australia
    ====================================
    How to make a good post: http://www.dts-l.org/goodpost.htm
    Defending your machine: http://defendingyourmachine2.blogspot.com/
    http://taurarian.mvps.org/index.htm

    Emails will not be acknowledged - please post to the newsgroup so all may benefit.


    | I've had SP2 and updates installed for a while and all is working well. I'd
    | like to delete the folders inside the $hf_mig$ file. I've heard not to
    | delete the $hf_mig$ folder itself. May I delete those folders without
    | affecting my XP Home system?
    |
    | --
    | Lady Dungeness
    | Crabby, but Great Legs!
    |
    |
     
    TaurArian [MS-MVP], Jul 4, 2007
    #2
    1. Advertisements

  3. I'll keep the FOLDER. What about the KB##### folders inside of it? Can I
    delete those?

    Lady D



    | Do not delete that folder. Leave it alone. It is a necessary folder for
    future updates
    | etc.
    | Description of the contents of Windows XP Service Pack 2 and Windows
    Server 2003 software
    | update packages
    | http://support.microsoft.com/default.aspx?scid=kb;en-us;824994
    | %windir%\$hf_mig$ folder
    |
    | You can delete these update uninstall folders/files -
    | Folders that have uninstall as part of the name (for example
    $NtUninstallKB282010$ which
    | reside in C:\windows (hidden folders) are Window Hot Fix Update
    folders/files) can be
    | safely deleted (providing you never wish to uninstall the updates). I
    would recommend
    | leaving these folders for a period of at least a month to make sure the
    update is working
    | correctly.
    |
    | These updates can be deleted individually or in multiples. To find out
    more about the
    | update/s go to:
    | http://support.microsoft.com/?kbid=XXXXXX
    | NB: XXXXXX = the actual number not including the "Q" or "KB"
    |
    | Once you have deleted the uninstall folders/files, then go to Control
    Panel, Add/Remove
    | Programs. Select the matching Windows Hotfix Title relating the update
    folder/file you
    | have just deleted and select remove. You will get a Windows error. This is
    because you
    | have deleted the uninstall folder/files. Just choose OK and the entry will
    be deleted from
    | the Add/Remove Programs Listing.
    |
    |
    | --
    | ====================================
    | TaurArian [MS-MVP] 2005-2008 - Australia
    | ====================================
    | How to make a good post: http://www.dts-l.org/goodpost.htm
    | Defending your machine: http://defendingyourmachine2.blogspot.com/
    | http://taurarian.mvps.org/index.htm
    |
    | Emails will not be acknowledged - please post to the newsgroup so all may
    benefit.
    |
    |
    | || I've had SP2 and updates installed for a while and all is working well.
    I'd
    || like to delete the folders inside the $hf_mig$ file. I've heard not to
    || delete the $hf_mig$ folder itself. May I delete those folders without
    || affecting my XP Home system?
    ||
    || --
    || Lady Dungeness
    || Crabby, but Great Legs!
    ||
    ||
    |
    |
     
    Lady Dungeness, Jul 6, 2007
    #3
  4. No.

    --
    ====================================
    TaurArian [MS-MVP] 2005-2008 - Australia
    ====================================
    How to make a good post: http://www.dts-l.org/goodpost.htm
    Defending your machine: http://defendingyourmachine2.blogspot.com/
    http://taurarian.mvps.org/index.htm

    Emails will not be acknowledged - please post to the newsgroup so all may benefit.


    | I'll keep the FOLDER. What about the KB##### folders inside of it? Can I
    | delete those?
    |
    | Lady D
    |
    |
    |
    | || Do not delete that folder. Leave it alone. It is a necessary folder for
    | future updates
    || etc.
    || Description of the contents of Windows XP Service Pack 2 and Windows
    | Server 2003 software
    || update packages
    || http://support.microsoft.com/default.aspx?scid=kb;en-us;824994
    || %windir%\$hf_mig$ folder
    ||
    || You can delete these update uninstall folders/files -
    || Folders that have uninstall as part of the name (for example
    | $NtUninstallKB282010$ which
    || reside in C:\windows (hidden folders) are Window Hot Fix Update
    | folders/files) can be
    || safely deleted (providing you never wish to uninstall the updates). I
    | would recommend
    || leaving these folders for a period of at least a month to make sure the
    | update is working
    || correctly.
    ||
    || These updates can be deleted individually or in multiples. To find out
    | more about the
    || update/s go to:
    || http://support.microsoft.com/?kbid=XXXXXX
    || NB: XXXXXX = the actual number not including the "Q" or "KB"
    ||
    || Once you have deleted the uninstall folders/files, then go to Control
    | Panel, Add/Remove
    || Programs. Select the matching Windows Hotfix Title relating the update
    | folder/file you
    || have just deleted and select remove. You will get a Windows error. This is
    | because you
    || have deleted the uninstall folder/files. Just choose OK and the entry will
    | be deleted from
    || the Add/Remove Programs Listing.
    ||
    ||
    || --
    || ====================================
    || TaurArian [MS-MVP] 2005-2008 - Australia
    || ====================================
    || How to make a good post: http://www.dts-l.org/goodpost.htm
    || Defending your machine: http://defendingyourmachine2.blogspot.com/
    || http://taurarian.mvps.org/index.htm
    ||
    || Emails will not be acknowledged - please post to the newsgroup so all may
    | benefit.
    ||
    ||
    || ||| I've had SP2 and updates installed for a while and all is working well.
    | I'd
    ||| like to delete the folders inside the $hf_mig$ file. I've heard not to
    ||| delete the $hf_mig$ folder itself. May I delete those folders without
    ||| affecting my XP Home system?
    |||
    ||| --
    ||| Lady Dungeness
    ||| Crabby, but Great Legs!
    |||
    |||
    ||
    ||
    |
     
    TaurArian [MS-MVP], Jul 6, 2007
    #4
  5. Lady Dungeness

    Joey Officer Guest

    Instead of deleting these files, may I move the $hf_mig$ folder to a drive
    with more space? I need to clear up quite a bit of space on my C: drive and
    this folder, while important, seems to be a big waste of space.

    Joey
     
    Joey Officer, Oct 21, 2007
    #5
  6. *** ONLY *** if you move the folder back prior to installing updates.
    The updates check the Version of the file being installed against the
    Version of the file that was updated previously.

    Suggest you delete the $NtUninstallKBxxxxxx$ folders as Taurarian
    suggested and clean out the %temp% folders of each User Account.
    Delete Temporary Internet Files via Internet Options in the Control
    Panel on the General page, too. And, limit the amount of space the TIF
    folder holds and have IE delete the TIF after closing the browser.

    How to Delete the Contents of the Temporary Internet Files Folder
    http://support.microsoft.com/kb/260897

    How to Adjust Cache Size for Temporary Internet Files
    http://support.microsoft.com/kb/155353

    Or, buy a bigger Hard Drive as they are relatively inexpensive
    nowadays <w>


    MowGreen [MVP 2003-2008]
    ===============
    *-343-* FDNY
    Never Forgotten
    ===============


     
    MowGreen [MVP], Oct 22, 2007
    #6
  7. Lady Dungeness

    Joey Officer Guest

    Admittedly storage is cheap, but atleast in my situation I'm in a VM
    environment and I cannot expand the C: drive.

    Moving it temporarily I think will work for me.

    Thanks,
    joey


    :
     
    Joey Officer, Oct 23, 2007
    #7
  8. Lady Dungeness

    Tey' Guest

    If your Windows version is installed on a NTFS partition, maybe you can
    create a NTFS junction for the <$hf_mig$> folder to another NTFS drive,
    so that you won't have to move it every time. I don't know when the
    junction is activated by the system, and especially, if some updates
    need to alter the system during boot time, the junction may not work yet.

    Can someone confirm it won't bring any problem using a junction for that
    folder please ?
     
    Tey', Dec 2, 2007
    #8
  9. Lady Dungeness

    antanelli Guest

    Try to compress that particular folder. It saved me about 150MB!
     
    antanelli, Aug 4, 2008
    #9
  10. NEVER delete nor compress $hf_mig$. The subfolders contained therein
    determine the branch of an update:

    Description of the contents of Windows XP Service Pack 2 and Windows
    Server 2003 software update packages
    http://support.microsoft.com/kb/824994
    If you need to reclaim disk space, see this:

    I want to Save Space and delete unnecessary files after installing a
    Windows Update patch or Service Pack.
    http://www3.telus.net/dandemar/spack.htm


    MowGreen [MVP 2003-2008]
    ===============
    *-343-* FDNY
    Never Forgotten
    ===============
     
    MowGreen [MVP], Aug 4, 2008
    #10
  11. Lady Dungeness

    bitwyse Guest

    I came across this thread rather belatedly!
    I am surprised that no-one has pointed out that many of the files in
    $hf_mig$ _can_ be deleted perfectly safely, since they are only duplicates
    (apart from different versions) which serve no useful purpose:

    $hf_mig$\KBnnnnnn\
    spuninst.exe
    spmsg.dll
    $hf_mig$\KBnnnnnn\update\
    update.exe
    spcustom.dll
    updspapi.dll
    eula.txt

    - as well as all 'KB*.log' files in the Windows directory and 'KB*.cat' in
    system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\

    Together with %systemroot%\$NTUninstall KBnnnnnn$\ and _all_ the files in
    %systemroot%\SoftwareDistribution\Download, that clears a lot of wasted
    space: I have often gained over 600MB on an uncleaned system with ~180
    updates.

    "Buy a bigger disk" to store more wasted space is a pretty silly suggestion!

    Clean up and uninstall everthing you never use* - that lets me fit a
    complete ASR backup of my XP SP2 Pro with a very wide range of programs on 1
    DVD.

    * for example all of the following can be removed (see my site for details):
    Movie Maker
    Netmeeting
    Outlook Express
    Microsoft Frontpage
    Windows Media Player
    Windows Messenger
    MSN
    Voice synthesis
    Microsoft Agent
    Wordpad
    Communications (unused components)
    Games
    Accessibility
     
    bitwyse, Oct 31, 2009
    #11
  12. Lady Dungeness

    Jim Guest

    Leave $hf_mgt$ alone.
    Jim
     
    Jim, Oct 31, 2009
    #12
  13. Lady Dungeness

    bitwyse Guest

    I came across this thread rather belatedly!
    I am surprised that no-one has pointed out that many of the files in
    $hf_mig$ _can_ be deleted perfectly safely, since they are only duplicates
    (apart from different versions) which serve no useful purpose:

    $hf_mig$\KBnnnnnn\
    spuninst.exe
    spmsg.dll
    $hf_mig$\KBnnnnnn\update\
    update.exe
    spcustom.dll
    updspapi.dll
    eula.txt

    - as well as all 'KB*.log' files in the Windows directory and 'KB*.cat' in
    system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\

    Together with %systemroot%\$NTUninstall KBnnnnnn$\ and _all_ the files in
    %systemroot%\SoftwareDistribution\Download, that clears a lot of wasted
    space: I have often gained over 600MB on an uncleaned system with ~180
    updates.

    "Buy a bigger disk" to store more wasted space is a pretty silly suggestion!
    - one should learn to manage better the space available.

    Clean up and uninstall everthing you never use* - that lets me fit a
    complete ASR backup of my XP SP2 Pro with a very wide range of programs on 1
    DVD.

    * for example all of the following can be removed (see my site for details):
    Movie Maker
    Netmeeting
    Outlook Express
    Microsoft Frontpage
    Windows Media Player
    Windows Messenger
    MSN
    Voice synthesis
    Microsoft Agent
    Wordpad
    Communications (unused components)
    Games
    Accessibility
     
    bitwyse, Oct 31, 2009
    #13
  14. Lady Dungeness

    MowGreen Guest

    You're post is EXTREMELY DANGEROUS, bitwyse as it contains INCREDIBLY
    WRONG MISINFORMATION !

    The problem with it is, if a naive User reads it and follows your ABSURD
    MISINFORMATION, their XP system will ***NEVER*** be able to install
    updates again !!!


    In XP, the files in $hf_mig$ are used to determine which *Branch* of an
    update should be installed.

    " When a security update, critical update, update, update rollup,
    driver, or feature pack installs GDR version files, the hotfix files are
    also copied to the %windir%\$hf_mig$ folder. This supports migration to
    the appropriate files if you later install a hotfix or service pack that
    includes earlier versions of these files. For example, consider the
    following scenario:

    1. You apply a security update that installs a GDR version of
    File.dll with a version number of 5.2.3790.1000 and copies a hotfix
    version of File.dll with a version number of 5.2.3790.1000 to the
    %windir%\$hf_mig$ folder.
    2. You apply a hotfix that includes a hotfix version of File.dll
    with a version number of 5.2.3790.0000.

    In this scenario the hotfix installation in step 2 installs the hotfix
    version of File.dll (version number 5.2.3790.1000) from the
    %windir%\$hf_mig$ folder instead of the hotfix version of File.dll
    (version number 5.2.3790.0000) from the hotfix package. "

    Source: http://support.microsoft.com/kb/824994

    The Catroot subfolder contains the Security Catalog database which
    determines if system binaries are digitally signed. The *lack* of signed
    system files is what is causing some XP systems to fail to install
    KB971486, the October Kernel update. The KBxxxxxx.cat file is the
    digital cert of Security Updates, which is then referenced by the
    CatRoot2 subfolder:

    Vulnerabilities in Windows Kernel Could Allow Elevation of Privilege
    (971486): MS09-058
    http://www.microsoft.com/technet/security/Bulletin/MS09-058.mspx

    NO XP system should *EVER* have *ANY* contents of the CatRoot subfolder
    deleted. *** EVER ***
    CatRoot2 can become corrupted and that is the ONLY catroot subfolder
    that should *EVER* be deleted.
    Why wouldn't anyone believe that when you obviously are *completely
    ignorant* on how XP updates ?


    MowGreen
    ===============
    *-343-* FDNY
    Never Forgotten
    ===============

    banthecheck.com
    "Security updates should *never* have *non-security content* prechecked"
     
    MowGreen, Oct 31, 2009
    #14
  15. Lady Dungeness

    bitwyse Guest

    Why? - provide specific, concrete reasons other than those already given.
    I have done exactly what I said since XP was released and never had a single
    problem.
     
    bitwyse, Oct 31, 2009
    #15
  16. Lady Dungeness

    MowGreen Guest

    Perhaps if you used an NNTP news reading client instead of a web browser
    (X-Newsreader: Microsoft CDO for Windows 2000) then you'd be able a
    COMPLETE REFUTATION of your lack of knowledge in regards to updating
    Windows XP:

    You're post is EXTREMELY DANGEROUS, bitwyse, as it contains INCREDIBLY
    WRONG MISINFORMATION !

    The problem with it is, if a naive User reads it and follows your ABSURD
    MISINFORMATION, their XP system will ***NEVER*** be able to install
    updates again !!!


    In XP, the files in $hf_mig$ are used to determine which *Branch* of an
    update should be installed.

    " When a security update, critical update, update, update rollup,
    driver, or feature pack installs GDR version files, the hotfix files are
    also copied to the %windir%\$hf_mig$ folder. This supports migration to
    the appropriate files if you later install a hotfix or service pack that
    includes earlier versions of these files. For example, consider the
    following scenario:

    1. You apply a security update that installs a GDR version of
    File.dll with a version number of 5.2.3790.1000 and copies a hotfix
    version of File.dll with a version number of 5.2.3790.1000 to the
    %windir%\$hf_mig$ folder.
    2. You apply a hotfix that includes a hotfix version of File.dll
    with a version number of 5.2.3790.0000.

    In this scenario the hotfix installation in step 2 installs the hotfix
    version of File.dll (version number 5.2.3790.1000) from the
    %windir%\$hf_mig$ folder instead of the hotfix version of File.dll
    (version number 5.2.3790.0000) from the hotfix package. "

    Source: http://support.microsoft.com/kb/824994

    The Catroot subfolder contains the Security Catalog database which
    determines if system binaries are digitally signed. The *lack* of signed
    system files is what is causing some XP systems to fail to install
    KB971486, the October Kernel update. The KBxxxxxx.cat file is the
    digital cert of Security Updates, which is then referenced by the
    CatRoot2 subfolder:

    Vulnerabilities in Windows Kernel Could Allow Elevation of Privilege
    (971486): MS09-058
    http://www.microsoft.com/technet/security/Bulletin/MS09-058.mspx

    NO XP system should *EVER* have *ANY* contents of the CatRoot subfolder
    deleted. *** EVER ***
    CatRoot2 can become corrupted and that is the ONLY catroot subfolder
    that should *EVER* be deleted.

    Why wouldn't anyone believe that when you obviously are *completely
    ignorant* on how XP updates ?


    MowGreen
    ===============
    *-343-* FDNY
    Never Forgotten
    ===============

    banthecheck.com
    "Security updates should *never* have *non-security content* prechecked"
     
    MowGreen, Oct 31, 2009
    #16
  17. Lady Dungeness

    bitwyse Guest

    Let's try to analyse things objectively instead of just mixing up everything
    we read superficially.
    Yeah, I've read all that before.

    So consider the following scenario:
    KB123456 has been installed, then
    %systemroot%\$NTUninstallKB123456$\ has been deleted, together with the
    information in the registry at
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
    an
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppManagement\ARPCache

    So why would
    %systemroot%\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\KB123456.cat
    ever be needed again? It no longer signs anything at all!

    Actually, all the confused ideas in this thread tempt me to go even further.

    Supposing (in general terms) that the files (version 1000) installed by
    KB123456 have since been replaced by later versions (1001) of the same files
    by KB234567. According to the arguments already repeated, if ever version
    1000 is proposed again, it will be instead the later version 1001 from
    $hf_mig$\KB234567 which will actually be used. So in fact $hf_mig$\KB123456
    is no longer needed.
    And so on... If KB345678 replaces KB234567 in turn with version 1002, there
    is even less need for the older version.

    So by carefully analysing successive versions of the same files replaced by
    later updates (taking account of the branch), we could also delete the older
    versions in $hf_mig$ which have become totally redundant.
    For example, in my scenario, the obsolete (because already replaced twice)
    versions 0998 and 0999 from previous KBnnnnnn would never be needed again.

    Presumably Windows Update isn't that stupid? (mind you anything is
    possible...). If indeed it is - it's past time to update the programming team!
     
    bitwyse, Oct 31, 2009
    #17
  18. Lady Dungeness

    bitwyse Guest

    Correction - it still signs what remains in $hf_mig$.
    I changed the order of what I wrote and anticipated the following train of
    thought which would eliminate that as well.
     
    bitwyse, Oct 31, 2009
    #18
  19. Lady Dungeness

    bitwyse Guest

    Another idea to try - NOT YET TESTED.

    At the key
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\WindowsXP\SP3\KBxxxxxx\Filelist\y
    there is often a value like
    "Location"="c:\\windows\\$hf_mig$\\KBxxxxxx\\update"

    Now what if we move the folder and change the location - for example to
    "d:\\$hf_mig$\\KBxxxxxx\\update"

    To check: is this location also recorded elsewhere?
     
    bitwyse, Nov 1, 2009
    #19
  20. This is probably true, although I'm not certain that there isn't a subtle catch
    somewhere. In any case the very small amount of space you could save by this
    approach is unlikely to be worth the effort and risk involved.

    Harry.
     
    Harry Johnston [MVP], Nov 1, 2009
    #20
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.