Saturday, September 25, 2010

A million dollar question?

Recently one of my blog readers asked me a very interesting question! The question was: What is 'winsxs' folder and why does it take 2 GB to 15 GB space on C: drive? How to free up this space?

Well, let me tell you very honestly that it was not a easy question to take! But I went through a lot of R&D for that, and now ready to answer it. Let us hope, I justify my stand.

ABCD of 'winsxs' 
So, first of all, for many of us who don't know what we have talked till now, let us understand the ABCD of question itself. 'winsxs' stands for Windows Side By Side. 'winsxs' folder is located at C:\Windows\winsxs; and occupies very large disk space! Note that the size of 'winsxs' folder in Windows XP is around 20-25 MB, and has a whopping size in Windows Vista/7.

winsxs: The reason of existence
  • The primary reason why 'winsxs' is there is that it is system folder, which means Windows need it to avoid compatibility issues while running different applications. 
  • It stores multiple copies of DLL's (Dynamic-link library) in order to let multiple applications run in Windows. 
So, if you ever noticed that, using Windows Vista/7 sometimes we face problem in running certain applications (say VCD Cutter), which otherwise working fine with Windows XP. If you dig inside the folder you will notice that there are lot of files having same name. These are actually different versions of the same files which are being stored; as different programs may require different versions.

winsxs: The space discrimination  
As mentioned earlier, Windows stores the old DLL's and library components in the 'winsxs' folder. And, if you have upgraded form earlier version of Windows to newer one, now a newer version of this file is a part of the OS, but a particular application requires a particular older version for running, then the older version from the 'winsxs' folder will be used, leaving the newer version in its present place, for other applications which may require it. 

So, if you have many applications installed, you can expect to have a jumbo sized 'winsxs' folder. And, 'winsxs' being a system folder, you cannot delete this directory or move it elsewhere. Also it is not advisable to delete anything here, because such a step could probably make your applications un-workable or even break your system! 

winsxs: Too hot to handle!
The safest way to handle it is by simply uninstalling applications which you don't require. However, this will not serve the prime cause, as many applications still leave behind their files here, since they may be shared between other applications. 

But, if you treat yourself as a hardcore system-man, and are in a mood to experiment, go for any of the following methods:
  1. Use vsp1cln.exe to clean up after Windows Vista SP1
    This method does seem to work in removing the redundant files left over after installing Windows Vista SP1. And, thankfully, Microsoft provides the Windows Vista SP1 Files Removal Tool (vsp1cln.exe), which does just that. The tool is automatically installed as part of the SP1 upgrade, and you can find it at (using run command) \%windir%\system32\vsp1cln.exe.  "Just make sure you’re sticking with SP1 before running the tool, as you can’t remove SP1 afterwards".  
  2. Use compcln.exe to clean up after Windows SP2
    Just like cleaning up after SP1, you can use the Service Pack Clean-up tool (compcln.exe) to remove the files left over after installing Windows Vista SP2. 'compcln.exe' is an improved version of the earlier 'vsp1cln.exe' tool. It is installed as part of the SP2 upgrade, and you’ll find it at \%windir%\system32\compcln.exe.
And, the final words... 
To many of us it may seem to be bit technical (which obviously it is ), even then let us enjoy it!! :)

This blog post is open for anyone who does not agree with the analysis given here and/or feel like adding something to the post.

4 comments:

Shravan Gupta said...

Nice blog Ankur,
Feeling nice after reading your tech. heavy blog. After reading the blog i got to know why C drive of my lappi consumed so much space. Keep enriching us by your blogs.
Regards
Shravan Gupta

Unknown said...

@Shravan Sure buddy. I believe there are lot of myths associated with our day-to-day to IT practices. Through this platform I am trying to highlight those issues!

Mitesh Sanghvi said...

Nicely explained. Keep it up!

Shoaib Qureshi said...

It was a bit technical but then a very good blog again. I don't have much of the problem with this folder as I use Windows XP but then this is a very useful info. Thanks.

Regards,
Shoaib Qureshi
http://soyasays.blogspot.com/