{"id":4645,"date":"2014-06-12T08:17:45","date_gmt":"2014-06-12T16:17:45","guid":{"rendered":"https:\/\/www.zubairalexander.com\/stage\/?p=4645"},"modified":"2015-01-16T17:20:24","modified_gmt":"2015-01-17T01:20:24","slug":"use-disk-cleanup-utility-to-clean-winsxs-folder-in-windows-clients-and-servers","status":"publish","type":"post","link":"https:\/\/www.zubairalexander.com\/blog\/use-disk-cleanup-utility-to-clean-winsxs-folder-in-windows-clients-and-servers\/","title":{"rendered":"Use Disk Cleanup Utility to Clean WinSxS Folder in Windows Clients and Servers"},"content":{"rendered":"<p>The WinSxS folder eats up a lot of disk space on Windows computers (both clients and servers). If you go to your WinSxS folder located in C:\\Windows and look at the properties of the folder, you will notice that the size is in several gigabytes. The size depends on several factors, such as the length of time your operating system has been running because this is where all the Windows Updates are kept so that if you wanted to uninstall an update you will be able to remove it from your computer. Keep in mind that when a new update supersedes an older update, the old update is still stored in this folder. That&#8217;s why I said over time, the amount of disk space used by WinSxS folder increases.<\/p>\n<p>The obvious question is how to reduce the size of this folder. According to Microsoft, in Windows 7 Service Pack (SP) 1 and Windows Server 2008 R2 Sp1, Microsoft added an update that includes a <a href=\"http:\/\/support.microsoft.com\/kb\/2852386\">Disk Cleanup Wizard<\/a>. This tool will remove the old updates and cleanup the disk. On Windows 7 SP1 you can go to Start -&gt; All Programs -&gt; Accessories -&gt; System Tools and access the Disk Cleanup tool. However, on Windows Server 2008 R2 SP1 you will need to install the Desktop Experience feature as\u00a0 <a href=\"http:\/\/support.microsoft.com\/kb\/2852386\">Microsoft&#8217;s KB article\u00a02852386<\/a> . On Windows 8.1 the tool is available by default. On Windows Server 2012 and Windows Server 2012 R2 you need to enable this functionality manually by installing the Windows Desktop Experience feature.<\/p>\n<p>I will use Windows 8.1, Windows 7 SP1, and Windows Server 2012 R2 as an example and show you the disk cleanup options that you may already have, or you will need to enable. Windows 2008 R2 has identical requirements as Windows Server 2012 so withing that section I will point out any differences between the two operating systems. First let&#8217;s look at Windows 8.1.<\/p>\n<p><strong>Using Disk Cleanup in Windows 8.1<\/strong><\/p>\n<ol>\n<li>In Windows 8.1 there at least three ways that I know to access the tool.<br \/>\na) You can go to Control Panel and click Free Up Disk Space under Administrative Tools.<br \/>\nb) Another easy way to access the tool is to use the &#8220;Windows Key + S&#8221; combination and in the Search box type Disk Cleanup.<br \/>\nc) The third method is to type <strong><span class=\"userInput\">cleanmg.exe<\/span><\/strong> in the Run box (&#8220;Windows Key + R&#8221; combination will bring up the Run box).<\/p>\n<p><img decoding=\"async\" class=\"alignnone  wp-image-4646\" src=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/FreeUpDiskSpace-300x218.png\" alt=\"FreeUpDiskSpace\" width=\"389\" height=\"283\" srcset=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/FreeUpDiskSpace-300x218.png 300w, https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/FreeUpDiskSpace-768x559.png 768w, https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/FreeUpDiskSpace.png 1023w\" sizes=\"(max-width: 389px) 100vw, 389px\" \/><\/li>\n<li>Select the drive letter, e.g. C where the WinSxS folder is located and click OK.\n<p><img decoding=\"async\" class=\"alignnone size-medium wp-image-4647\" src=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/FreeUpDiskSpace2-300x155.png\" alt=\"FreeUpDiskSpace2\" width=\"300\" height=\"155\" \/><\/li>\n<li>Windows will estimate the amount of disk space that can be freed by Downloaded Program Files, Temporary Internet Files, Recycle Bin, Setup Log Files, temporary files, thumbnails, user file history, Windows Defender, device drive packages, Windows upgrade log files, user file history, etc. The list of item depends on the type of system, how you use your system, and what type of updates you have installed. I keep my system fairly cleaned and I still have 167MB of disk space that can be freed up.\u00a0 Select or clear the boxes as necessary and click OK.\n<p><img decoding=\"async\" class=\"alignnone size-medium wp-image-4648\" src=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/FreeUpDiskSpace3-243x300.png\" alt=\"FreeUpDiskSpace3\" width=\"243\" height=\"300\" srcset=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/FreeUpDiskSpace3-243x300.png 243w, https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/FreeUpDiskSpace3.png 384w\" sizes=\"(max-width: 243px) 100vw, 243px\" \/><\/li>\n<li>You can also select Clean up system files at the bottom (see screenshot below). This is likely to clean up gigabytes of disk space. It will take quite a bit longer for system to estimate the amount of free disk space when you select this option.\n<p><a href=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/FreeUpDiskSpace4.png\"><img decoding=\"async\" class=\"alignnone size-medium wp-image-4649\" src=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/FreeUpDiskSpace4-243x300.png\" alt=\"FreeUpDiskSpace4\" width=\"243\" height=\"300\" srcset=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/FreeUpDiskSpace4-243x300.png 243w, https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/FreeUpDiskSpace4.png 384w\" sizes=\"(max-width: 243px) 100vw, 243px\" \/><\/a><\/li>\n<li>When the system recalculates the disk space it may look like the screenshot below. Notice this time it included Windows Update Cleanup, which alone is using 0.97GB that I can free up. You can also click on the More Options tab to clean up programs that you don&#8217;t use anymore, or delete the old system restore points. Click OK to start the clean up.\n<p><a href=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/FreeUpDiskSpace5.png\"><img decoding=\"async\" class=\"alignnone size-medium wp-image-4650\" src=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/FreeUpDiskSpace5-243x300.png\" alt=\"FreeUpDiskSpace5\" width=\"243\" height=\"300\" \/><\/a><\/li>\n<\/ol>\n<p><strong>Using Disk Cleanup in Windows 7<\/strong><\/p>\n<p>I noticed that my drive C was running out of disk space on my Windows 7 computer, ash shown below.<\/p>\n<p><a href=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/Win7Cleanup01.png\"><img decoding=\"async\" class=\"alignnone size-medium wp-image-4651\" src=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/Win7Cleanup01-300x85.png\" alt=\"Win7Cleanup01\" width=\"300\" height=\"85\" \/><\/a><\/p>\n<p>I ran a script and found out that my WinSxS folder was using most of my disk space. When I looked at the disk usage for the WinSxS folder it was more than 18GB.<\/p>\n<p><a href=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/Win7Cleanup02.png\"><img decoding=\"async\" class=\"alignnone size-medium wp-image-4652\" src=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/Win7Cleanup02-231x300.png\" alt=\"Win7Cleanup02\" width=\"231\" height=\"300\" \/><\/a><\/p>\n<p>If you have Windows 7 Service Pack 1 installed, the Disk Cleanup tool is located in Start -&gt; All Programs -&gt; Accessories -&gt; System Tools.<\/p>\n<p><a href=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/Win7Cleanup03.png\"><img decoding=\"async\" class=\"alignnone size-medium wp-image-4653\" src=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/Win7Cleanup03-178x300.png\" alt=\"Win7Cleanup03\" width=\"178\" height=\"300\" \/><\/a><\/p>\n<p>I selected the option to Clean up system files and noticed that I can free up 8 GB of disk space. The old Windows Updates alone gave me over 7 GB of free space.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-medium wp-image-4654\" src=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/Win7Cleanup04-253x300.png\" alt=\"Win7Cleanup04\" width=\"253\" height=\"300\" srcset=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/Win7Cleanup04-253x300.png 253w, https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/Win7Cleanup04.png 385w\" sizes=\"(max-width: 253px) 100vw, 253px\" \/><\/p>\n<p>After the cleanup, instead of 1.4 GB I now have almost 6 GB of free space and the drive is no longer showing up in red, which means I have some breathing room.<\/p>\n<p><a href=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/Win7Cleanup05.png\"><img decoding=\"async\" class=\"alignnone size-medium wp-image-4656\" src=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/Win7Cleanup05-300x85.png\" alt=\"Win7Cleanup05\" width=\"300\" height=\"85\" srcset=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/Win7Cleanup05-300x85.png 300w, https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/Win7Cleanup05.png 521w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>You may have to restart the computer after the disk cleanup.<\/p>\n<p><strong>Using Disk Cleanup in Windows Server 2012 R2<br \/>\n<\/strong><\/p>\n<p>On a Windows Server 2012 R2, initially you will not see the Disk Cleanup utility on the Properties of your drive. After you install the Desktop Experience feature you will see the tool.<\/p>\n<p><span style=\"text-decoration: underline;\">NOTE<\/span>: You can also get Disk Cleanup tool in Windows Server 2008 R2 by installing the Desktop Experience as described in this section.<\/p>\n<ol>\n<li>Go to the Properties of your disk drive and notice there is no option for Disk Cleanup on the General tab at this time.\n<p><img decoding=\"async\" class=\"alignnone size-medium wp-image-4657\" src=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/DiskCleanupUtility01-221x300.png\" alt=\"DiskCleanupUtility01\" width=\"221\" height=\"300\" \/><\/li>\n<li>Start the Server Manager.<\/li>\n<li>Click Add roles and features on the Dashboard.\n<p><a href=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/DiskCleanupUtility02.png\"><img decoding=\"async\" class=\"alignnone size-medium wp-image-4658\" src=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/DiskCleanupUtility02-300x168.png\" alt=\"DiskCleanupUtility02\" width=\"300\" height=\"168\" srcset=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/DiskCleanupUtility02-300x168.png 300w, https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/DiskCleanupUtility02.png 709w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/li>\n<li>Keep clicking next until you get to the Features section.<\/li>\n<li>Expand the User interfaces and infrastructure feature and then select the box Desktop Experience. You will be prompted to add additional role service or features as shown in the screenshot below. Click Add Features.<span style=\"text-decoration: underline;\">NOTE<\/span>: On a Windows Server 2008 R2 the Desktop Experience is not listed under User interfaces and infrastructure. It is listed alphabetically along with the other features.\n<p><img decoding=\"async\" class=\"alignnone size-medium wp-image-4659\" src=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/DiskCleanupUtility03-300x185.png\" alt=\"DiskCleanupUtility03\" width=\"300\" height=\"185\" srcset=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/DiskCleanupUtility03-300x185.png 300w, https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/DiskCleanupUtility03-768x475.png 768w, https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/DiskCleanupUtility03.png 914w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/li>\n<li>You should restart the server after the feature installation is complete.<\/li>\n<li>After the restart, go the the Properties of any drive, e.g. drive C. Notice now you have the option for Disk Cleanup. If you don&#8217;t see the option, you probably haven&#8217;t restarted the server. The tool works exactly the same way on a server as it does on Windows 7 and Windows 8.1 clients as described above.\n<p><a href=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/DiskCleanupUtility04.png\"><img decoding=\"async\" class=\"alignnone size-medium wp-image-4660\" src=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/DiskCleanupUtility04-222x300.png\" alt=\"DiskCleanupUtility04\" width=\"222\" height=\"300\" srcset=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/DiskCleanupUtility04-222x300.png 222w, https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2014\/06\/DiskCleanupUtility04.png 372w\" sizes=\"(max-width: 222px) 100vw, 222px\" \/><\/a><\/li>\n<\/ol>\n<p><strong>Summary<\/strong><\/p>\n<p>Disk Cleanup tool is a great way to do some house cleaning on your computer and free up disk space. The system drive, which is Drive C by default, can get full after an extended usage. You can keep your system clean and get rid of the junk files that are useless on your computer.<\/p>\n<p>On Windows 7, the SP1 update adds a new plugin to the Disk Cleanup wizard. Once you have the SP1 installed, you can use the Windows Update Cleanup option to delete Windows updates that you no longer need. Windows 8.1 has the Disk Cleanup feature available by default. On Windows Server 2008 R2 and Windows Server 2012 R2 you have to enable the Desktop Experience feature before you can use this feature. The following <a href=\"http:\/\/support.microsoft.com\/kb\/2852386\">KB article 2852386<\/a> has some additional information that you may find useful.<\/p>\n<p>While there are other methods, such as copying the <strong>cleanmgr.exe<\/strong> and <strong>cleanmgr.exe.mui<\/strong> in the appropriate location on the Windows server, as described in this <a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/ff630161%28WS.10%29.aspx\">Microsoft article<\/a>, according to Microsoft, the best practice is to use the Desktop Experience as I have described in this article.<\/p>\n<hr \/>\n<p><span style=\"font-size: xx-small; font-family: Verdana;\">Copyright \u00a92014 Zubair Alexander. All rights reserved.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The WinSxS folder eats up a lot of disk space on Windows computers (both clients and servers). If you go to your WinSxS folder located in C:\\Windows and look at the properties of the folder, you will notice that the size is in several gigabytes. The size depends on several factors, such as the length [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[43,11,30,65,58,64],"tags":[],"class_list":["post-4645","post","type-post","status-publish","format-standard","hentry","category-articles","category-tips-tricks","category-longhorn-server","category-windows-2012","category-windows-7","category-windows-8"],"aioseo_notices":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/posts\/4645","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/comments?post=4645"}],"version-history":[{"count":0,"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/posts\/4645\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/media?parent=4645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/categories?post=4645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/tags?post=4645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}