The Winsxs folder, stores multiple copies of dll’s in order to let multiple applications run in Windows without any compatibility problem. If you browse inside, you will see what look like a lot of duplicate dlls, each having the same name. These are actually, different versions of the same files which are being stored; as different programs may require different versions. In short, Winsxs, which stands for ‘Windows Side By Side’, is Vista’s native assembly cache. Libraries which are being by multiple applications are stored there. This feature was first introduced, in Windows ME and was considered as Microsoft’s solution to the so-called ‘dll hell’ issues that plagued Windows 9x.
WinSXS folder on Windows 7 / Vista / Server 2008 is one important folder and it keeps shadow copy of all your important system files, which gets changed during any installation of Patches or Updates or software. It will store a backup copy of all those system files which are changed by installation program so that it can restore them back in case something bad happens due to patch or Installation or you want to completely remove the patch. In earlier version of Windows this facility was available but not all system files were reverted to original state. With the use of WinSXS Folder all system files can be reverted back to the stage where it was before installation of Patch/ Update.
This is really a great feature but for users who got limited space this great feature is becoming worst nightmare as with everyday new updates/ patch keep coming and WinSXS folder increases to 10-15 GB in size within a short period of time. There are few Built in tool in Vista Sp1 & SP2 which can clean up some files from WinSXS folder but they will make the patch installation permanent, which means you will not be able to uninstall the patches after using these tools.
In Vista, there isn’t a ‘dllcache’ folder and nor can you find the ‘i386’ folder, where the system caches (like in XP) all it’s source modules. It is this WinSxS folder which stores the shared components of side-by-side applications. These files can be multiple versions of the same assembly or application. Every side-by-side assembly has a unique identity. One of the attributes of the assembly identity is its version. "Side-by-side assemblies are used by the operating system as fundamental units of naming, binding, versioning, deployment, and configuration. The Winsxs folder includes all manifests, optional components and 3rd party Win32 files".
Most of you may have noticed the WinSxS folder and been surprised at its size. For those who have not, the folder is situated at C:\Windows\Winsxs and has a whopping size ! Mine is almost 5 GB and has around 6000 folders & 25000 files and occupies almost 40% of the Windows folder ! While the size of this Winsxs folder, in XP is around 25-50 MB; its large size in Vista, is intriguing, to many !
But, why so many subfolders, and why keep so many different versions of the same dll, exe or other files ?
As mentioned, Windows stores the old dll’s and library components in the WinSxS folder. Now if 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 obviously you cannot delete this directory or move it elsewhere. Nor is it advisable to delete anything here, as such a step could probably make your applications un-workable or even break your system! If you have many applications installed, you can expect to have a jumbo sized winsxs folder.
If you delete components from the WinSxS folder like the manifets or the assemblies, etc, you could be in trouble. Each system would react differently. What may work for one could break another! For instance, if you install a program that requires that particular assembly, which you may have deleted, then that program will just not run! Compressing the folder is also a no-no, as it could cause problems during WindowsUpdates or while installing a Hotfix.
The safest way to clean it, is by simply uninstalling applications which you don’t require. However, this too is not fool proof, as many applications still leave behind their files here, since they may be shared between other applications. So the probability of dud unused dll’s being left behind is quite high.
And if you are into trying out new software or installing and uninstalling frequently, you may notice that your winsxs size is indeed large, as Vista will store multiple copies of these dll files, in order to let multiple applications without compatibility problem.
How to reduce winsxs folder size ?
Microsoft did not thought about this problem because now the days TB of space is available in less than 100$ which makes them think to use it and provide a user experience which will be good and robust. They did not think about SSD and Virtual machine usages. The bad news are that I don’t recommend doing any manual removals on winsxs folder. Such a step could probably make your applications non-workable or even break your system! If you have Vista sp1 installed, then use the command vsp1cln.exe : The utility removes all Vista SP1 uninstall files and by using it you can reduce few gigs. However, for those whose SP2, you actually ran “compcln.exe” – which enabled me to reclaim about 970MB only, nothing outstanding. I can have space more than 2GB with running the script to clean the temp/logs.
Well Now question does I can simply remove the files in WinSXS folder like I delete any other file, well that’s a viable option but is not recommended, I tried it once on my Vista Installation, it did not harm anything and after deletion my windows was working fine except one thing I cannot install any Patch/ Update after that. Whenever I try to do that I simply get an error that some important system file missing and installation cannot proceed. So I recovered about 14 GB space but in return I left with no patch support.
These utility was about Windows Vista and we have not found anything similar for Windows 7 as of now, so if you looking to recover space in Windows 7 probably you have to wait till Microsoft announces some utility to address this problem.
To run vsp1cln.exe:
- Press on vista start button type cmd.exe and hit on enter.
- Then enter the following command:Vsp1cln.exe and press enter key
- You will be asked to confirm your action , just press “Y” and after few minutes your winsxs will be smaller.
Other ways to reduce the winsxs folder:
- You can uninstall non needed application
- If you have office 2007 installed , and you can get later distribution like with sp1 included – uninstall your entire office, and install the version that includes sp files.
- You can run the script bellow to cleanup some temporary files and system logs.
del %temp%\. /f/s/q rd /s/q %temp%\ del %tmp%\. /f/s/q rd /s/q %tmp%\ del /f /s /q %systemdrive%\*.dmp del /f /s /q %systemdrive%\*.tmp del /f /s /q %systemdrive%\*._mp del /f /s /q %systemdrive%\*.log del /f /s /q %systemdrive%\*.old
Let’s start with WinSXSLinker
I found three ways to get free space on system drive, first and second are reducing winsxs folder and third moving it away from windows folder.
1. Remove previous Service Packs that take up much space.
2. To achieve saving some space there is a workaround – to manually remove some files from WINSXS subfolders.
Take great care what subfolders you can remove, because you may break your Windows installation and all future windows startup will be finished with "blue screen". Usually you can remove content of folder %windir%\winsxs\ManifestCache (%windir% – path to windows folder, by default it is C:\\Windows). To make it empty you need change this folder owner to Administrators and provide full access permissions to this folder also. Deleting this folder content allows save about 5% of winsxs size.
3. I moved winsxs to another drive where I had required free space using WinSXSLinker application. Of course you can make the same manually with creating required symbol links and modifying windows registery.
Before run this application I need change winsxs folder and all subfolders/files owner to Administrators and grant full access permissions. Close all opened windows and run WinSXSLinker. There you need select folder to move winsxs and restart windows. To get system drive free space need point wisxs destination to another drive.
As result winsxs folder is moved from your WINDOWS folder to another drive you selected and system drive has 10Gb-20Gb free disk space. You can still find winsxs folder inside WINDOWS folder with a lot subfolders but it is just link to moved winsxs folder. Physically is winsxs located on the your defined folder.
For advanced users:
After windows restarts you get winsxs.linker folder in the chosen destination and have full access to modify winsxs folder content as you want. Pay attention removing any files from winsxs or winsxs.linker folder can get windows bluescreen. I do not recomend make you it. If you sure to remove then at least make backup of files you will remove to have a chance restore them.
Contact email@example.com if you have any questions or found a bug.
Under no circumstances should you ever manually delete items from this folder. Doing so can interfere with critical system functions and may eventually lead to a situation in which you need to reinstall Windows Vista. However, one user has developed a tool that can safely remove unnecessary files from this directory, saving large amounts of hard drive space.
WinsxsLite – WinSXS Folder Cleanup Utility
Another solution came from Christian Bering Boegh. He has created a tool called WinsxsLite, which works by deleting some unnecessary files and, in their place, linking to the latest versions of the same files (the WinSxS folder, by default, contains duplicates of many files). You can download the latest version of WinsxsLite (1.8.6) here. An instruction file is included–be sure to read it thoroughly before running the tool.
Note, however, the following stern warning: “WinsxsLite makes irreversible changes to the entire system partition. The only way to undo these changes, is to restore the system partition from a backup taken before running WinsxsLite.” In other words, unless you really need the 3GB or so that WinsxsLite will likely recover, you’re better off leaving the WinSxS folder alone.
Well if you are using Windows Vista or Windows 7 for a year or two, then by now you must have been thinking about way to reduce size of WinSXS folder. If not then just check the size of WinSXS folder inside your windows directory and you will be force to start thinking about it. Most of the users worldwide have reported size of this folder between 5-10 GB and some even reports it up to 20 GB in size.
Before running the WinSXSLite, we personally advise that you take a full system backup of your windows partition by using any of the backup utility. I use CloneZilla for this because it is free and Open Source. Once Backup is taken you can run.
WinSXSLite is split into 2 phases, the first phase will search the files which are identical in size with the files stored in WinSXS folder and as per program can be removed. This is required because with a lot of Files backed up by MS Windows are actually not changing but stored as backup in WinSXS folder and resulting in huge size of Folder.
Second Phase will replace all version of each and every file stored in WinSXS folder and will create hard link to highest version of file in program location or other location. So that if any other program look for File it can be found and at the same time There is no actual file but only Directory entries for the file.
This way we can remove the files after making hard links and Still MS windows will think that it has the file backed up in WinSXS folder. Only disadvantage of this process will be that you can restore back your System files, but that you anyway don’t want if you need space recovered, because for having restoration utility to work you must have back up copy.
***Please not that the latest version of WinSXSLite is available at their site and it is compatible with Windows Vista and Windows 7 only.