Posted on January 31, 2014 · Posted in Windows 7

How to clean-up system disk in Windows 7 SP1 by deprecated system updates deleting

Today we will talk about one update which was anticipated by Windows 7 fans for a very long time. The name of the game is KB2852386 ( update which allows to delete deprecated updates (updates which were replaced with the newer ones) with a help of a new parameter of Windows 7 default disk cleaning manager – Windows Cleanup Tool (cleanmgr.exe). This update is not compulsory, it can be installed via Windows Update or downloaded manually from Microsoft website.

It is to be recalled that in Windows 7  in case of any system update installation system files are replaced with newer ones and their older versions are saved in WinSxS folder. (C:\Windows\WinSxS). As a result any system update may be deleted safely at any time. However with installation of new updates such attitude will lead to apparent WinSxS catalogue size increase (it turns out that the older the system and the larger the quantity of updates the bigger is the size of WinSxS folder) of course it`s a problem for users, especially for those who are SSD disks or disks with small load partition owners. Formerly, there was no optional deprecated update files deleting utility in Windows 7 that’s why  to decrease WinSxS folder size one had to use different tricks.

Tip. We have already mentioned the problem of WinSxS folder in Windows on this website. You can also get some useful information from this article.

Note It was possible to delete dead files which had left after SP1 installation in Windows 7/2008. It was possible due to the command of our favourite DISM utility:

dism /online /cleanup-image /spsuperseded

It’s normal that after the execution of this command it will become impossible to roll back Windows 7 SP 1 installation.

Now thanks to updated version of Windows 7 cleanup manager you can delete deprecated Windows updates, this will allow to decrease the size of WinSxS folder significantly.

Technical requirements for KB2852386 update installation

  1. The update is created only for Windows 7 SP 1
  2. If you download the update from Microsoft website on your own initiative (there is a link at the beginning of this article) you will be asked to install Windows validation verification utility(Genuine Windows Validation). In case of the update installation through Windows Update manual validation is not necessary .

How to clean up WinSxS folder by deleting deprecated updates

  1. Download and install update KB 2852386
  2. Launch Cleanup Manager with administrative privilege by typing the following in command line:
  3. Select the drive on which Windows 7 is installed (usually it`s drive C:\)KB2852386 new disk cleanup option in windows 7
  4. Press “Clean up system files” buttonwindows update cleanup windows7
  5. After that system scanning is started (Scanning: Windows Update Cleanup) and the range of options which were unavailable during the first start would appear in the list.
  6. Check Windows Update Cleanup option in the window that will appear. The utility will show the approximate space size which will be available after deleting of deprecated updates. In our example approximately 4 Gb will be available on system drive.

    Note. Windows Update Cleanup option is available only if Disk Cleanup manager finds Windows 7 updates which are no longer needed and can be deleted. 

    delete old updates in windows 7

  7. Press Ok and the system will start deletion of unused files (usually this process takes quite a long time).
  8. After the end of cleaning up process reset the system. During system downloading the window with message «Cleaning up. Do not turn off your computer» may appear.Cleaning up. Do not turn off your computer windows7

Note: It`s important to understand that after performance of cleaning up process with a help of this Manager it will be impossible to cancel the installation of updates which replaced the previous ones.

How to automate WinSxS folder cleaning up

In case when it is necessary to perform deletion of Windows 7 unused updates on plenty of PCs at the same time (of course nobody will run from one PC to another, performing all these operations manually!) it’s necessary to use simple automation.

To make this we should make certain changes in registry and start cleaning up command according to the schedule.

It is necessary to add a parameter of DWORD type with StateFlags0015 name to the registry (generally the last two figures can be any figures from 0 to 65535, it’s important to remember them because we will use them later on) and value 2 in registry branch:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Update Cleanup

 Tip. You can make above mentioned changes in the registry for example with a help of group policies (logon script, GPP etc).

The last thing to do, is to perform the following command by any automation means (for example  with a help of task scheduler, at , SCCM or logon script):

cleanmgr /sagerun:15

The above mentioned command will enable automated deletion of deprecated Windiws 7 updates and will delete unused files from WinSxS catalogue.

Related Articles