none
How to cleanup the winsxs folder in 2008 r2

    Question

  • I have searched throughout this site and still not found an answer to how to miminse the size of the winsxs folder.

    regardless of if the files are actually there or hardlinks or etc, the fact is that somefiles somehwere on the drive are using all the free space and windows reports that it is taking up 18GB on a 30Gb drive. and we are constantly running out of free space and exchange stops working. This server is not used for anything but exchange and the logs and data are on other drives.

    Now please direct me to a fix for this issue as the OS should not be consuming this much free space.

    Thursday, April 12, 2012 5:32 AM

Answers

All replies

  • Thursday, April 12, 2012 5:35 AM
  • If Service Pack is installed on the server, you can use below command to free up some space from winsxs folder.

    You need to run the command from elevated cmd (run as administrator)

    DISM /online /Cleanup-Image /SpSuperseded

    Having said that, its not recommended to touch winsxs !

    Please refer a recent discussion on same topic. 

    Windows 2008 R2 winsxs/vss 

    http://social.technet.microsoft.com/Forums/en-US/winservergen/thread/f5c40113-4464-48ef-a436-b0f355258741/


    If it looks good, Eat it ! Likewise, If you don't know the answers, don't hesitate to ask questions !!

    This posting is provided "AS IS" with no warranties or guarantees and confers no rights.

    About Me !!!

    Thursday, April 12, 2012 6:50 AM
    Moderator
  • Hi,

    Thank you for the post.

    Please read KB2592038:
    To remove the Service Pack files from a Windows installation use the following in-box utilities:
    Windows 7 or Windows Server 2008 R2 Service Pack 1: DISM /online /Cleanup-Image /SpSuperseded or Disk Cleanup Wizard (cleanmgr.exe)

    If there are more inquiries on this issue, please feel free to let us know.

    Regards


    Rick Tan

    TechNet Community Support

    Thursday, April 12, 2012 7:33 AM
    Moderator
  • Hi,

    Be sure to un-install any services and programmes that are not necessary and remember the more updates you install the greater space the OS will take up.

    Hope it helps


    Lewis.j.Routledge

    Thursday, April 12, 2012 9:46 AM
  • @Rick Tan:  Your link appears to be broken. 

    For those of you that may need it here is basically what he was saying:

    http://support.microsoft.com/kb/2795190


    Find this post helpful? Does this post answer your question? Be sure to mark it appropriately to help others find answers to their searches.

    Wednesday, March 27, 2013 7:06 PM
  • @Rick Tan:  Your link appears to be broken. 

    For those of you that may need it here is basically what he was saying:

    http://support.microsoft.com/kb/2795190


    Find this post helpful? Does this post answer your question? Be sure to mark it appropriately to help others find answers to their searches.

    The answer is the only way to clean the winsxs folder up is to uninstall updates and software. There is no guarantee that this will return back to its original size as the files maybe hard linked somewhere.

    For 99.9% of us uninstalling updates and software is not really an option, these articles on cleaning up odd files in the os and using disk cleanup is a joke.

    • Proposed as answer by GerVoeten Monday, September 30, 2013 12:25 PM
    Friday, March 29, 2013 1:29 PM
  • http://support.microsoft.com/kb/2852386


    Regards, Praveen Kumar Reddy

    Friday, September 19, 2014 1:21 PM
  • An old thread yes, but same problem. One of the servers I look after has 10GB of directories/files in the winsxs directory. There are 16,614 folders in there and I have the cleanup KB installed - it reports zero bytes of Service Pack Backup Files to be cleaned.

    Running DISM /online /Cleanup-Image /SpSuperseded reports:

    Service Pack Cleanup can't proceed: No service pack backup files were found.
    The operation completed successfully. Umm try 10GB and 16k plus files....

    I attempted to Move all folders older than Dec 31 2015 but they are all locked by the TrustedInstaller - which does not have the option to stop that service.

    I need space. Microsoft bloatware in action yet again...

    Sunday, October 16, 2016 4:09 PM
  • This solved my issue - https://support.microsoft.com/en-us/kb/2852386

    http://www.microsoft.com/downloads/details.aspx?FamilyId=3c2805f2-0867-4c5e-addf-9379efa99829


    Monday, October 24, 2016 5:51 PM
  • That KB (KB2852386) does not work for many servers I look after. I have one today with over 20GB in winsxs and running DISM does not reduce it by 1KB, claims nothing to delete. See my post above.
    Thursday, October 27, 2016 12:35 PM