9 GB winsxs --> howto cleanup on server2012?

Answered 9 GB winsxs --> howto cleanup on server2012?

  • Saturday, January 05, 2013 3:37 PM
     
     

    Hello, my server2012 is 9 GB after the following command : dism /online /cleanup-image /spsuperseded /hidesp

    I want to clean this up.

    What is a full working procedure to clean this up, without messing up?

    Thx

All Replies

  • Sunday, January 06, 2013 12:45 AM
     
     

    Hi,

    if you apply this command in your server it will show you " No service pack backup files were found " because this command remove service pack   from the installed Updates section of Programs and Features and you will not be able to uninstall the Service Pack (in this case we talk about windows server 2012 RTM), so I think this command will help you:

    Dism /online /cleanup-image /startcomponentcleanup



    Oussama Oueslati | System Engineer | vNext Consulting



  • Sunday, January 06, 2013 8:54 AM
     
     

    Hello Oussama,

    the command is valid for Server2012.

    The command applied and the server rebooted.

    But still after reboot :

    Many files in this folder, and 9,5 GB.

    Are there any more options?

    Thx

  • Sunday, January 06, 2013 11:57 AM
     
     
    please refer:

    How to address disk space issues that are caused by a large Windows component store (WinSxS) directory
    http://support.microsoft.com/kb/2795190

    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

  • Sunday, January 06, 2013 1:05 PM
     
     

    Hello Don,

    when I do a Search on server2012 for " disk cleanup" there is nothing found.

    What is the procedure for disk cleanup for server2012?

  • Sunday, January 06, 2013 4:09 PM
     
     

    Hi,

    you can use the PowerShell to enable the Desktop feature  " Add-WindowsFeature Desktop-Experience " and then you can cleanup your disk with a simple right click in your local disk "C:", choose Properties  and run the disk cleanup

    Best Regards;


    Oussama Oueslati | System Engineer | vNext Consulting

  • Sunday, January 06, 2013 5:02 PM
     
     

    Hi Oussame,

    that did the trick for enabling Disk cleanup!

    But, when running disk-cleanup, only 8 MB can be cleaned.

    What are the possibilities to shrink the 9,5 GB of files in winsxs?

    Thx

  • Sunday, January 06, 2013 5:54 PM
     
     

    Hi,<o:p></o:p>

    the WinSXS folder is the biggest folder under the C:\Windows which takemore than 6 GB by default, and you have 9,5 GB  it's not a very big difference but if you insist to shrink the size of the winsxs we need some information about your server like " role and feature installed , is windows update activated or no " , also to get more information about the Winsxs folder take a look at this link :

    http://blogs.technet.com/b/joscon/archive/2010/08/06/should-you-delete-files-in-the-winsxs-directory-and-what-s-the-deal-with-vss.aspx


    Oussama Oueslati | System Engineer | vNext Consulting

  • Monday, January 07, 2013 4:16 AM
     
     
  • Tuesday, January 08, 2013 7:25 AM
     
     

    I think the conclusion is that 9 GB for winsxs isn`t that much?

  • Wednesday, January 09, 2013 8:46 AM
     
     Proposed Answer

    In windows Server 2012 you can use some new features to cleanup the winSXS folder.


    To cleanup any windows feature payload (Features on demand new in Win2012) from the system you currently don't use execute the following command:
    Get-WindowsFeature | where-object{$_.Installed -eq 0 -and $_.InstallState -eq 'Available'} | uninstall-windowsfeature -remove

    You can remove any backup files created during the installation of a service pack by using the following command:
    dism /online /cleanup-image /SPSuperseded
    To further cleanup any superseded components and reduce the size of the component store execute:
    dism /online /cleanup-image /StartComponentCleanup

    Check my blog for more details:

    http://itbully.com/articles/winsxs-and-windows-server-2012-cleaning-methods

    -------------------------
    Lefteris Karafilis
    MCSE, MCT, SEC+
    LinkedIn: http://www.linkedin.com/in/lkarafilis
    Mail: lefteris@karafilis.net
    Blog: http://itbully.com/ideas/ekarafilis




  • Friday, January 11, 2013 7:17 AM
     
     

    I tried above option.

    Folder is at the moment 10.4 GB.

    I think there are no other options to shrink this folder?

  • Friday, January 11, 2013 1:15 PM
     
     

    That's the best you can do. (1) Cleanup the unused feature payloads (2) Cleanup Service Pack backup files (3) Cleanup Superseded components. Manual deletion is unsupported and pose a threat to the stability of the system. 

    Note, that WinSXS folder sometimes is perceived to be much larger than actually is. This misconception is because windows explorer and dir command are not aware of the difference between actual files and hardlinks. To have a better view of the disk space consumed by WinSXS you can use the SysInternal's du utility with the -u switch (du -u -v c:\windows\winSXS).

    -------------------------

    Lefteris Karafilis
    MCSE, MCT, SEC+
    LinkedIn: http://www.linkedin.com/in/lkarafilis 
    Mail: lefteris@karafilis.net 
    Bloghttp://itbully.com/ideas/ekarafilis

  • Saturday, January 12, 2013 12:22 PM
     
     

    Hello Lefteris,

    I have run this command with the following result:

    What extra information will this tell me?

    THx

  • Saturday, January 12, 2013 1:49 PM
     
     Answered

    It reports the size consumption on the disk which is approx 10,5G counting each hardlink as a different instance. If you execute the same command without the -u switch you may get a different, lower, size because the utility will not count each hardlink as a different instance and will report the real consumption on the HDD. 

    In my last answer I pointed you to use the -u switch to get the single the instance result. It was a fast typing mistake. You should use the command without the -u switch!

    -------------------------

    Lefteris Karafilis
    MCSE, MCT, SEC+
    LinkedIn: http://www.linkedin.com/in/lkarafilis 
    Mail: lefteris@karafilis.net 
    Bloghttp://itbully.com/ideas/ekarafilis