Windows

TR Dojo Challenge: How do you safely reduce the size of the WinSxS folder?

Randomly deleting files from the WinSxS folder may crash system. If you can safely shrink the WinSxS folder, you could earn some TechRepublic swag?
On Windows Vista, Windows 7, and Windows Server 2008 machines, the WinSxS folder can take up quite a bit of space. On the test system shown in Figure A, the WinSxS folder takes up just over 13GB, which is 65 percent of the entire Windows folder.

Even in the day of 500GB hard drives, 13GB isn't an insignificant amount of space. You could store about 3,700 MP3s on that amount of space. And on older machines with hard drivers under 100MB, conserving space is the name of the game.

So, here's this week's question: How do you safely reduce the size of the WinSxS folder? Note: Of course, you could just go into the WinSxS folder and start willy-nilly deleting files. But, you might very well make your system unstable. So to get full credit for this question, you need to explain why randomly deleting files within the WinSxS folder is a bad idea and how you can reduce the size without compromising system integrity.

About the TR Dojo Challenge Series

Each week, I publish a new question designed to test the technical skills and IT prowess of our TechRepublic members. You can submit an answer to the question by posting it within this post's discussion thread.

I'll accept answer submissions for one week after I post the question. At the end of the week, I'll consider the question closed and review the answers. The member who submitted the first, best answer will be featured in a follow-up TR Dojo Challenge article, posted on Thursday the week following the question's publication. For being featured on the site, they will also earn themselves a bit of TechRepublic swag-a coffee mug and laptop sticker.

The rules:

  1. Only answers submitted within one week of the initial question's publication date will be considered for the follow-up article and swag.
  2. All answers must be original and must consist of more than a link or links to third-party resources.
  3. I will choose the correct response from the answers submitted and my decision is final.

Good Luck!

About

Bill Detwiler is Managing Editor of TechRepublic and Tech Pro Research and the host of Cracking Open, CNET and TechRepublic's popular online show. Prior to joining TechRepublic in 2000, Bill was an IT manager, database administrator, and desktop supp...

11 comments
GreatZen
GreatZen

It is a common misconception that WinSxS is just a folder that holds currently used and redundant .dlls. For all intents and purposes, what the folder actually holds is the operating system. "Redundant" .dlls are simply the most common reason for the excessive growth of this directory. Hard links are also responsible for the "growth" of this folder. For those who are not already aware, hard links in Vista/Windows7 cause Windows Explorer to drastically misreport the size of the WinSxS folder. However, there are EFFECTIVE and simple methods for cleaning up WinSxS! A little use of the search bar and a "Y" are all you need! MicroSoft has two tools for removing legacy components from previous major service pack levels. Keep in mind that using the cleaning tool makes it impossible to revert a service pack install so be sure all your major applications still function with the new service pack. For Vista SP1 (as noted already by richardqt) use vsp1cln.exe by entering it into the search bar. For Vista SP2 use compcln.exe by entering it into the search bar. If you want to use the command line interface to use either program, both of them are installed to the c:\windows\system32\ folder by default and can be accessed by typing "cmd" into the search bar and using Right Click->Run As Administrator. There are some largely unimportant command line switches available if you fancy a short spin through the brief technet explanations provided below. Hard links explained by the Windows7 engineering team: http://blogs.msdn.com/e7/archive/2008/11/19/disk-space.aspx Command line options for the SP1 Undo Uninstaller: http://technet.microsoft.com/en-us/library/cc709655%28WS.10%29.aspx Command line options for the SP2 Undo Uninstaller (aka the Windows Component Clean Tool): http://technet.microsoft.com/en-us/library/dd335037%28WS.10%29.aspx#BKMK_COMPCLN

WilliaMITCHELL
WilliaMITCHELL

Recopy the contents, all except for maybe the first five...reboot, and if everything runs smoothly, continue...

WilliaMITCHELL
WilliaMITCHELL

How about copying the contents, except for may be 5 of the files (one can start from the top, and work down), then reboot, (and if sucessful) continue...

richardqt
richardqt

"Windows Side by Side". It's a part of the move to a "component" based architecture, where the WinSxS folder contains multiple versions of a component such as Windows Media Player or IIS, and the appropriate versions are hard-linked into the system. Unfortunately, Windows is stupid (surprise!), and provides no easy way to remove old versions. While it's understandable that users might want to uninstall updates for one reason or another, after the initial install it becomes pretty unlikely. Now that Vista SP1 is out, there is a tool which will remove all of the RTM versions of updated components. Unless you plan on uninstalling SP1, there is no reason to keep these components around. Cleaning out the directory is pretty simple. Click the start menu, and in the search field type vsp1cln. A single result should show up. I have UAC disabled on my system, so if it's an issue run cmd first, and run the utility through that. I started with a WinSxS folder of 10.9 GB. After running the cleaning tool, it dropped to 8.48 GB - nearly 2.5 GB! While this doesn't matter so much on desktops, it could make a big difference in virtual machines, or on laptops. It's too bad that there isn't a nice way to do this from a GUI. Hopefully SP2 will include one.

Datacommguy
Datacommguy

And I didn't like the trip. According to Micro$oft, you can't safely remove ANY files from the Windows Side-by-Side folder. In further discussions, they admitted that you might be able to clean out some entries there that older programs would expect to access after updates, but each user's environment would be different. Having said that, and knowing that the TR community is not composed of 'normal' users, I'd bet that some stuff could be selectively cut, but M$ claims that almost all current and newer M$ programs use and add to this directory so any cuts would probably only be temporary relief. They added that there are some third party offerings that may work to some extent, but they've had problems with the one's they've come in contact with.

Bill Detwiler
Bill Detwiler

On Windows Vista, Windows 7, and Windows Server 2008 machines, the WinSxS folder can take up quite a bit of space. But, randomly deleting files from the WinSxS folder may make your system unstable. So, here's the question: So, here's this week's question: How do you safely reduce the size of the WinSxS folder? TR Dojo blog post: http://blogs.techrepublic.com.com/itdojo/?p=1036 I'll accept answer submissions for one week after I post the question. During that time, TechRepublic members can submit an answer to the question by posting it within this discussion thread. At the end of the week, I'll consider the question closed and review the answers. The member who submitted the first, best answer will be featured in a follow-up TR Dojo Challenge article, posted on Thursday the week following the question?s publication. For being featured on the site, they will also earn themselves a bit of TechRepublic swag-a coffee mug and laptop sticker.

kb6252
kb6252

I have XP so the SxS folder is only 32MB (23MB compressed). Looking through the folder and searching for descriptions of the DLL files in the folders, it appears that the system root certificates and some runtime libraries like C++ reside here. It's also possible it may have catalog-security files. I'd leave it alone until doing further research. If you must delete folders, I would start out with moving a few to a backup folder for a while just in case something goes wrong. Compressing this disk folder will also save space. Go ahead and compress the whole disk folder by folder when you have time--it's worthwhile. I would not even recommend doing anything else without backing up your entire system on an external drive. Then you may experiment. If anything goes wrong, I wash my hands of it. YOU HAVE BEEN WARNED! As for me, I'm leaving as it is. I'm monitoring which files get added and altered each day to see what happens.

medo35_2010
medo35_2010

This is a short definition for "Winsxs": The Winsxs folder stores multiple copies(Versions) of dll's in order to let multiple applications run in Windows without any compatibility problem. This mean that I can run programs which require different versions of the same dll. The folder size is actually counted twice , as its files are considered a hard link for the actual files which found in "Windows\System32". As you said we can't randomly delete any files from this folder , for 2 reasons 1-any deleting in this folder will cause problems when running applications later. 2-MS made a protection on it making its owner "TrustedInstaller" which have Full permissions and any user only have"Read and Execute permissions" , and only advanced users can change The security permissions. So the only solutions to reduce the folder size is removing some applications which we don't use from the OS , which probably delete some DLL and other files from the Winsxs folder .

GreatZen
GreatZen

Sorry, edited/removed this post to place it properly in the hierarchy by replying to original blog entry.

medo35_2010
medo35_2010

This is a short definition for "Winsxs": The Winsxs folder stores multiple copies(Versions) of dll's in order to let multiple applications run in Windows without any compatibility problem. This mean that I can run programs which require different versions of the same dll. The folder size is actually counted twice , as its files are considered a hard link for the actual files which found in "Windows\System32". As you said we can't randomly delete any files from this folder , for 2 reasons 1-any deleting in this folder will cause problems when running applications later. 2-MS made a protection on it making its owner "TrustedInstaller" which have Full permissions and any user only have"Read and Execute permissions" , and only advanced users can change The security permissions. So the only solutions to reduce the folder size is removing some applications which we don't use from the OS , which probably delete some DLL and other files from the Winsxs folder .

Editor's Picks