The Winsxs Folder Explained
Windows users who have run a disk space analyzer like TreeSize or WizTree in the last days may have stumbled for the first time upon the Winsxs folder in the Windows directory.
The folder usually has a size of about 5 to 8 Gigabytes on Windows Vista and Windows 7 or newer, there are however reports of bigger folders, up to 16 Gigabytes and more.
Especially Windows XP users who recently switched to Windows 7 may have asked themselves why the size of the folder increased from a few Megabytes to Gigabytes.
Internet search engines and message boards are full with questions about the folder, many users want to know if it is safe to delete the Winsxs folder, if it needs to be included in operating system backups or why it has such an enormous size compared to other Windows folders.
It is important to take a look back in time. Back in Windows 9x, the operating system had troubles with dynamic link libraries, more precisely with different versions of the same dll. There was simply no way to store multiple versions of a dll, which led to incompatibilities and other problems.
Then in Windows ME, Microsoft began to include options to store multiple dll versions using the same name in the operating system. It was not until Windows Vista that this technology was turned into what Vista and Windows 7 users are experiencing today.
If you open the folder in Windows Explorer you will notice a huge folder list, with each folder containing at least one file, but often multiple files. Folders that begin with the same name host different versions of the same dll, there are sometimes five or more folders that host different versions of the same dynamic link library.
Winsxs, stands for Windows Side by Side, referring to the concept of hosting the same files in different versions in the operating system.
The backup folder is displayed as the largest folder in the Winsxs folder, followed by the naturallanguage6 folder and Manifests.
A Technet blog post by Jeff Hugh explains the move from an INF described OS to componentization in Windows Vista.
All of the components in the operating system are found in the WinSxS folder â€“ in fact we call this location the component store. Each component has a unique name that includes the version, language, and processor architecture that it was built for. The WinSxS folder is the only location that the component is found on the system, all other instances of the files that you see on the system are â€œprojectedâ€ by hard linking from the component store. Let me repeat that last point â€“ there is only one instance (or full data copy) of each version of each file in the OS, and that instance is located in the WinSxS folder. So looked at from that perspective, the WinSxS folder is really the entirety of the whole OS, referred to as a "flat" in down-level operating systems. This also accounts for why you will no longer be prompted for media when running operations such as System File Checker (SFC), or when installing additional features and roles.
Jeff's post gives an answer to the question if it is safe to delete files in the winsxs folder, in short: It is not.
The only option to reduce the file size of that folder safely is to remove software from the operating system that is not needed anymore, but even that won't drop the file size considerably.
The only way to safely reduce the size of the WinSxS folder is to reduce the set of possible actions that the system can take â€“ the easiest way to do that is to remove the packages that installed the components in the first place. This can be done by uninstalling superseded versions of packages that are on your system. Service Pack 1 contains a binary called VSP1CLN.EXE, a tool that will make the Service Pack package permanent (not removable) on your system, and remove the RTM versions of all superseded components. This can only be done because by making the Service Pack permanent we can guarantee that we wonâ€™t ever need the RTM versions.
It is best to leave the folder alone. Windows Vista users may be able to reduce the size of the Winsxs folder by running a third party application WinsxsLite
WinsxsLite is meant as a tool to help reduce the size of winsxs in Vista.
WinsxsLite is split into two phases.
The first phase searches the Program Files and Windows folders for files,
that are exactly identical to files in the winsxs folder.
The second phase replaces all the old versions of each file in winsxs,
with hardlinks to the highest version file.
So, it will still seem like there's, say, 16 different versions of a
particular file, but in reality, there's only one data object pointed to
by 16 directory entries.
Additionally, unused localized files can be eliminated, by replacing them
with hardlinks to the corresponding files in other languages.
Note: Both phases are optional.
Note: If Vista SP1 is installed, make sure vsp1cln.exe has been run.
It is highly advised to create a system backup before running WinsxsLite, considering that the software makes irreversible changes to the Windows system partition that can only be undone by a backup.
The latest version of the program is always available at the Google Code project website. The site links to a Rapidshare download location, we have taken the liberty to upload the latest file to our servers as well. You can download the 20K tool below: WinsxsLite1.86
Please note that it is only compatible with Windows Vista, and not Windows 7.
Windows Vista users with the Service Pack installed can furthermore run the VSP1CLN command-line tool to remove files that are not longer needed after the service pack has been installed. Please note that these files are needed for uninstalling the SP in Vista.
Do you have additional tips on reducing the size of the Winsxs folder? Let us know about them in the comments.
Update: Recent information indicate that the Winsxs folder may in fact not be as large as it is reported by the system, and the main reason for that is that many of the files in the folder are hard links pointing to files elsewhere on the system.
â€œThe Windows SxS directory represents the â€œinstallation and servicing stateâ€ of all system components. But in reality it doesnâ€™t actually consume as much disk space as it appears when using the built-in tools (DIR and Explorer) to measure disk space used. The fact that we make it tricky for you to know how much space is actually consumed in a directory is definitely a fair point!
In practice, nearly every file in the WinSxS directory is a â€œhard linkâ€ to the physical files elsewhere on the systemâ€”meaning that the files are not actually in this directory. For instance in the WinSxS there might be a file called advapi32.dll that takes up >700K however whatâ€™s being reported is a hard link to the actual file that lives in the Windows\System32, and it will be counted twice (or more) when simply looking at the individual directories from Windows Explorer.â€
You may analyze and cleanup the WinSXS folder using DISM commands on Windows 8 or newer versions of the Windows operating system.
More information about that is available on the Engineering Windows 7 blog.
Seems like you better allocated a 30GB C: partition in Win7! Whew.
Now, on my WinXP SP3 system, WinSxS consumes only 75MB.
The folder that I would really like to remove is called “Installer”. This folder is 3GB in size and consumes 40% of my C: Partition! This is by far the biggest folder in C:\Windows.
I deleted this folder some months ago, thinking that it shouldn’t cause any problems. WRONG! My system was all hosed up when I rebooted. I had to restore an image file to get everything working again.
So let’s see a story on this folder. What is is for? Why does the system depend on it? Can it be reduced in size? Does it also exist in Win7? How does it compare in size to WinSxS?
Well Installer exists in Windows 7 as well, it has a size of 746 Megabytes on my system. You can try the Windows Installer Cleanup Tool http://majorgeeks.com/Windows_Installer_CleanUp_Utility_d4459.html to remove files in the installer folder that are no longer needed. Microsoft has recently removed that tool from their website. I would advise to backup the system before running the tool.
Consider un-installing programs instead of updating them. I don’t know how this will apply to the Installer folder, but in one particular case, Java, the running application caches files in use by user and/or update version, and if you just install the new update, it leaves the old files present. On the other hand, many applications will leave Registry records when you un-install – which is fine if you want to install an updated program immediately to continue using it. Maybe they just need to fix Java’s installer… then again, you can install and use separate versions of Java itself, so there could be an actual reason for keeping its multiple incarnations on the disk. You would do this if you use an application that depends on a previous version of Java and you can’t get it updated.
The nifty VLC video player does something clever and possibly lazy here: when you install an update (at time of writing 1.1.6 fixes some bugs and security issues), it apparently runs its own previous un-installer itself, then re-installs. Basically just what I advised you to do on your own.
This is a real problem for those of us in enterprise environments where we rely on VMWare and SANs for storage. We want to start rolling out Windows Server 2008 and suddenly we need a minimum of 20gb (40 reccomended) for disk space vs. the 10 that 2003 needed. Multiply that times 500-700 machines, and you’ve got some real huge storage growth just because of this.
Wow. First MS have given us the fantastic Audiolg.exe driver which uses all of your processor for some stupid audio task resulting in pauses during avi playback, but now they have outdone themselves with this spectacularly wasteful folder! What’s next MS? How about a program which connects to the internet and uploads the entire disk contents to a random Latvian hacker every time you press a key?
I discovered the winsx$ folder a day before. as I was running into problems disk space when upgrading to windows 7. In this situation when I am not going to use Vista anymore can I erase files which have not been modified or accessed for many months. Please advise
Daaaaaarn, well, let’s leave the folder alone then haha. Isn’t like current computers can’t handle a 16gb operative system..
This file can use 1/2 of a SSD.
SSD are usually bought to run windows, and maybe 1 or 2 programs fast, and used in conjuction with a HDD for main storage.
If some1 was runing XP, then they would probably only have the SDD. WHen they upg they have no space at all lol.
I like the idea of using links to reduce the disk usage, but I’d be more interested in a tool that merged only identical DLLs (maybe using a MD5 hash) instead of hoping older software works with newer versions.
(actually, that tool should ideally be the OS itself…)
As usual, bloatware prevails over leanware because bloatware means business for a lot of people. Surely HDD manufacturers have been raising their glasses to the Winsxs!
Anyone who calls it bloatware is an idiot who has not understood why you would have multiple dll versions available.
Well, over 22.000 folders, 85.500 files and more than 20GB for that lovely winsxs folder on my Vista x64 Ultimate – seems a bit bloated, as useful it may be … . O&O Defrag tries to analyze/defrag my system partition and hangs for about three hours now – and have a guess in what folder!
At what cost backwards compatibility? How long is Windows going to support apps written for Windows 98? 2015? 2020? When do you say the disk space and performance cost is too much and it’s time to move on?
Look at the Documents folder. It has shortcuts inside of shortcuts all linking in a recursive loop to My Documents, Downloads, My Downloads, etc. Then you have Libraries which is even more of a mess.
Anyone who thinks that soaking up 10GB keeping versions of DLLs going back 15 years just in the extremely slight chance that the user may need to use a 15 year old version program… I mean really? In XP, you know what we did if we ran into a DLL compatibility problem? We just downloaded the correct version of the DLL and slapped it right in the Program Files folder local to the app.
Why does 10GB matter? Ever heard of SSDs?
well at 48gb I see a reformat on the horizon. MS obviously doesn’t give a rats about SSD owners. Thanks MS.
My cousin recently was given an older laptop. It had a whole 100MB of free space on it. After doing some checking around and searching I found the winsxs folder was 55GB out of the 64GB total HD space. I’ve done some searching and I’ve see most saying the largest they have seen is 16GB and a few in the 20’s but nothing quiet as high as 55GB. Most solutions for this is to install SP1 and 2 and it will help reduce the size of it. The only issue with that is the lack of space to install the service packs. I’m thinking a format is the only solution to his issue.
Off the top of my head, you could uninstall some other updates and then install service packs. Or delete restore points. But first check for virus and such.
My SXS folder, after enabling some offline file stuff with group policy, has jumped above 100 GB…. Apparently, one of the microsoft discovery services loves to find network shares and cache all the DLL’s with unique identifiers…. Microsoft, are you serious? I’ve stood in your corner for 15 years and no I hate to say it, but all these crackhead mac users are right. This OS has become a bloated, recycled piece of garbage.
Oh thats fun. This operation just turned my nice 11 gig free on my SSD to 3gb!! This really sucks Microsoft, thanks much for the fail here…
The only way to really keep the Winsxs folder under check is to integrate hotfixes into the Windows installation iso. This way the system won’t see the old versions of files, ever.
Or wait for SP3 when finally MS acknowledges that there is actually a problem and release a tool that deletes all the superseded system files (you know, the ones for witch the hotfixes were for)
I understand the WOW64 stuff – that has to do with running 32 bit apps on a 64 bit OS. In fact, I understand the drivers for all except the 4.16gb of AMD drivers. Anyone know why they are necessary on an Intel motherboard?
(Referrring to all the files beginning with AMD* in the winsxs folder in windows 7)
So why not admit that the DLL concept is broken?
We see the huge downside of maintaining them. Not to talk of the huge effort for code to use them, compared to static libraries. Now is there any benefit? Any 2 prorams using the same DLL resulting in considerable savings in disk space, that makes the hassle worth wile?
Some interesting points here, but any Java coders will know that the single platform vision never works anyway, at least not in a useful and productive way. You must always use external code for anything you produce which is more than minutely trivial and without library files available through the OS (i.e. the JVM which is static to all intents and purposes) you are stuck with the proliferation of different (and the same) file versions being installed, and re-installed by a variety of different software components. On a Windows server I use we have a massive 35 versions of apache.commons jar file. All of the instaled software works, but if I want to write code to interact with them it can waste many, many man days, and potentially result in serious bugs down the line. Having the OS manage side by side the relevant libraries and having them available without static linking and compilation is a real boon.
All I’m hearing is “It’s to hard to program differently, f*ck it.”
FYI, all these folders are AMD64 because Intel dumped it’s own 64 bit system a long time ago in favour of the AMD64 instruction set. (see/Wiki AMD64) So most all 64 bit Intel chips run AMD64 code. MS etc are thinking of todays entry PCs which carry 320G+ drives so ~11G of winxsx is no big deal. It’s like Java, ie its a dog for performance but it makes a huge amount of bad code work. Todays programmers are not the geeks of the 80’s. They don’t care about efficiency. More, More, more just works for them. If your crap code doesn’t work are you going to tell your self and your customer that you’re an idiot? No! You are going to say they need to spend more on more disk space, a faster machine, and more in your lazy ass pocket. This is the future now that “B” students are writing code.
Wow. Steve’s April 9 comment about using AMD64 instruction set stopped me from hosing my system by deleting what any reasonable person running an Intel processor would think are totally unnecessary folders and files. TY.
Really MS/Intel, you couldn’t come up with a different or better naming scheme to make things clearer?
Hey Microsoft, fuckwits, do you read these replies? Do you give a flying FUCK about how FUCKING OUTRAGEOUSLY PISSED OFF many of your users are? Multiple DLLs? Give me a FUCKING BREAK, sack your useless coders from the 9x days and get this gigantic fucking folder OFF MY FUCKING COMPUTER.
@ MS R CUNTZ you, sir win the internet.
Perhaps Microsoft could provide me with a replacement PC while they get there product to work satisfacturally
Currently 22.1 GB on my parentsâ€™ computer running Vista Home Premium â€“ ridiculous! Virus scans/defrag take forever & theyâ€™re almost out of disk space, and this folder plays a huge part in that. Iâ€™m with â€˜Morgan Feldonâ€™ â€” Iâ€™ll take manually downloading a .dll file in order to make an old program run over the â€œconvenienceâ€ of already housing every-single-version-ever of it any day.
Not proud of the fact I run an 11-year-old operating system on my own machine, but this is one very good reason why.
â€¦(Note that Iâ€™m also running a current version of Linux & a 4-year-old version of OSx86, so Iâ€™m not COMPLETELY clinging to XP) :)
This is why Linux wins all day every day. Honestly, this winsxs crap just helps add to my argument that if it weren’t for my love of video games, I wouldn’t have windows at all…and even then my laptop came with Vista and after I got tired of fighting with an overbloated OS, I downgraded to XP and haven’t been happier with that decision. Just to illustrate, not only is the OS disk usage much smaller, the performance blows Vista out the water. I can run xp on minimum 256MB of memory (I have 2GB), I wouldn’t want to even attempt vista on anything less than 1 GB of memory, and even then you really need 2GB (and that’s just to get it to run properly, good luck doing anything memory intensive, like gaming or hardcore coding, on anything less than a fairly high end system). For gaming and overall performance, I’ll take the os that uses 1/4 the resources and isn’t loaded with a bunch of unneeded crap, and use linux for everything else (internet, coding, some games, media playback, and everything else that I don’t need windows for which really isn’t much).
Seems that there is a bit of misinformation here. The sizes indicated are not accurate. The winsxs folder is not as big as it appears. From:
“The Windows SxS directory represents the â€œinstallation and servicing stateâ€ of all system components. But in reality it doesnâ€™t actually consume as much disk space as it appears when using the built-in tools (DIR and Explorer) to measure disk space used. The fact that we make it tricky for you to know how much space is actually consumed in a directory is definitely a fair point!
In practice, nearly every file in the WinSxS directory is a â€œhard linkâ€ to the physical files elsewhere on the systemâ€”meaning that the files are not actually in this directory. For instance in the WinSxS there might be a file called advapi32.dll that takes up >700K however whatâ€™s being reported is a hard link to the actual file that lives in the Windows\System32, and it will be counted twice (or more) when simply looking at the individual directories from Windows Explorer.”
Thanks for brining that to my attention. i have added an update to the end of the article.
My winsxs is 12 GB big and my C-drive is only 37 GB. I simply moved the winsxs-folder to my other HDD (which has 3 TB capacity). Then I made a Directory Junction from C:\Windows\winsxs to the moved folders new location using:
mklink /J “C:\Windows\winsxs” “F:\C-Windows-dir-junction\winsxs”
This will make Windows, and all other programs, think that the folder still exists at C:\Windows\winsxs, when it really is at F:\C-Windows-dir-junction\winsxs. Just make sure you don’t remove other drive before you either move it back or move it to another drive and update the directory junction to point to the other drive.
I have found the solution mentioned in the below link or winsxs cleanup. Have’nt implemented in my server yet, thought of sharing with others