Remove windows update uninstall files in windows 8


  • This is a problem starting from Windows Vista...
    I already read that it is not so simple to remove uninstall files as it was in Windows XP, because the actual OS arquitecture presents WinSXS, that is very good for compatibility issues. But it needs to collect all versions of files necessary for application compatibility, so their dependencies are sustained. This brings problems when it comes to discard old files, since I didn't find any solution provided by MS.
    But the big problem with Windows Update cames when disk cost grows to almost the triple of is initial size. This is a very high cost for maintaining Windows in a confined space such as 25GB.
    Surprisingly Windows 8 start with almost 6GB, less then what was necessary for Windows 7, but when it starts to receive updates or installing apps it just triples that size with an amazingly fast reaction. Windows 7 didn't grow up like that...
    So this moment I'm trying to find all possible solutions for clean up and to minimize disk space. I already test Disk Cleanup Manager that cames with Windows, that do a good job, already review SoftwareDistribution folder for downloaded updates that are not deleted by Disk Cleanup utility, and also test ccleaner, but this only seems better regarding to the user profile clean up.
    Then I removed all not needed features with dism utility that presents very new interesting features.
    But with all of this, Windows size was only reduced approximately 3GB, from 15GB to 12GB.
    Since I'm trying to prepare a base image with latest windows updates applied and with a size aproximated to the initial installation size, I'm trying to find a way to remove all windows update uninstall files.
    So I'll ask you if there is any tool like those for windows udpate SPs removal, such that it would be possible to remove all windows update uninstall files/backups.
    It would be better if there was an option to avoid windows to save uninstall files/backups. For a Windows workstation that are part of an entrerprise management infrastructure with system center, image deployment and roaming profiles, such features only brings heavy disk cost that are in most cases big disadvantages... I already disabled windows system restore  because of that.
    For those that already face same problems and found a solution, please help!
    Friday, June 14, 2013 12:59 PM


All replies

  • Windows 8 has some new ways to cleanup the WinSxS folder a bit.

    You can use the new /Remove flag in Disable-Feature to delete the files of uninstalled features.

    DISM.exe /Online /Disable-Feature /Featurename:<name> /Remove

    Next you can detect and uninstall updates which are replaced by newer one (newer cumulative IE update) by running th disk cleanup wizard

    or running this DISM command:

    dism.exe /online /cleanup-image /startcomponentcleanup

    "A programmer is just a tool which converts caffeine into code"

    Friday, June 14, 2013 5:46 PM
  • I already do all that steps, except the last dism command you referred (nice one, I didn't realise that, but it does the same as cleanmgr with windows update cleanup).

    Actually I've run cleanmgr /sageset:<#> and select all options for cleanup and then add a task scheduler job to run with action cleanmgr /sagerun:<#> each time system starts up.

    Then, because SoftwareDistribution/Downloads contents are not deleted I just created a script to delete it.

    But the result is as I said: in 15GB after a clean install (Win 8 Enterprise) + applying latest windows updates the best I could do was freeing 3GB with steps above.

    Since initial install have less then 6GB and after updates it goes to 15GB, I was trying to discover what are the changed files that are not being used.

    With cleanup as I mentioned above image size goes to 12GB, so it seems that after updates it retains the double of its initial size. This is almost a complete substitution of the initial system in grow size, so I beleive that there should be many retained update files that are not necessary.

    So I'll continue to research about that and I leave here the chalenge to all w8 comunity to share their achievements.

    Thanks to all!

    Friday, June 14, 2013 10:45 PM
  • that are the only 2 supported ways to make WinSxS smaller. You can purchase one of the Windows 8 Embedded Versions and build your own image with only the features you want.

    "A programmer is just a tool which converts caffeine into code"

    Saturday, June 15, 2013 7:26 AM
  • In my case the platform target isn't an embeded system, so there is no advantage to install a windows 8 embedded version.

    Actually I've built my base image using new Windows 8 ADK, that allows to create a personalized image from windows 8 enterprise release.

    Adding updates to a base image can be done online (using windows update client within a running system) or offline (using DISM tool).

    DISM allows to add updates to an offline image doing the following:

    1- mount wim image
    DISM /Mount-Image /ImageFile:E:\images\myimage.wim /Index:1 /MountDir:C:\MyDir\Mount

    2- apply update packages
    DISM /image:C:\MyDir\Mount /Add-Package /Packagepath:<file_path>\package.msu

    3- unmount and commit changes
    DISM /Unmount-Image /MountDir:C:\MyDir\Mount /Commit

    But results from windows updates offline install are just the same as online. So space problem continues and winsxs files management continues to be a very important flavor...

    One solution I'm already researching for is to analyse winsxs folder and find duplicated filenames within same architecture (grouping in 32bit or 64bit). Then scan for most recent ones and discard the others.

    This happen with dll files associated with many services. If a service is running with latest version it is almost impossible to an application be using the older versions. So I think that all of this kind of files could be deleted without causing any arm to the system.

    Take into account Windows API architecture provided to develop 3rd party apps, I don't see why new dll releases will compromise older versions of installed apps. So there is no need to be backing up all files like it does.

    Improvements and tools in this kind of features would be apreciated by MS W8 developing team.

    Wednesday, June 19, 2013 2:32 AM
  • Btw, MS released an update with the KB number which compressed the WinSxS folder a bit to reduce space. So make sure the update is installed.

    "A programmer is just a tool which converts caffeine into code"

    Wednesday, June 19, 2013 7:38 PM
  • Btw, MS released an update with the KB number which compressed the WinSxS folder a bit to reduce space. So make sure the update is installed.

    I tested it in a VM and here is the difference (~ 1.7 GB difference):

    before installing the update and running the cleanup:

    And here after the cleanup:

    "A programmer is just a tool which converts caffeine into code"

    Friday, June 21, 2013 7:14 AM