How To Reduce Size of WinSXS

I’ve read all about WinSXS (Side by Side) and how it tries to solve the DLL Hell problems that have plagued Windows for ages, but I thought it was ridiculous that this folder was taking up over 10 gigs of precious space on my 64 GB solid state drive. A few months back, I replaced my laptop’s optical drive with a 500 gig HDD to try to move some of my media and documents over. However, when I went to install the latest service pack to Visual Studio today, I noticed I didn’t have enough space to install it. I used a simple tool called TreeSize Free to analyze the disk space and see what was taking up all the room. A quick drill down of the largest item showed that the WinSXS folder was talking up 10.2 GB of space.

2010-01-04_103841

Some research showed that if you have Windows Vista SP1 installed, there is a tool called VSP1CLN.exe in the C:\Windows\System32 folder which can be used to clean up the old (pre SP1) files to regain some space. The downside to this is you won’t be able to uninstall SP1, so you should make sure the system is running stable with SP1 before running the tool. I looked for this file, but quickly realized that it could not be found! It turns out this was because I don’t have Vista SP1 installed (I actually have SP2 installed). If you have SP1 installed, you can use the VSP1CLN file in place of COMPCLN in the directions below.

You can check your Service Pack version by looking at your computer properties: click Start, then right clicking on Computer and clicking Properties. This showed I was running Windows Vista Service Pack 2:

2010-01-04_104243

A bit more research later and I found that Vista SP2 has a similar Service Pack Cleanup Tool in the same C:\Windows\System32 directory called COMPCLN.exe. You can start the program by using the following instructions:

  1. Click Start > Run
  2. Type in CMD and press [enter]
  3. At the command prompt, type COMPCLN and press [enter]
  4. Press Y when prompted to continue
    (the application will now start cleaning up the old files)

2010-01-04_105040

The size of the WinSXS folder (and potentially others?) should now have been reduced. On my computer, I found that the WinSXS folder was only reduced by 1 GB, but others have seen 3-4 GB reductions.


Posted

in

by

Comments

55 responses to “How To Reduce Size of WinSXS”

  1. Bill Bennett Avatar

    It’s a useful tip, but I only saved 400MB – with Vista now hogging almost 30GB on my hard drive. Seems the operating system is poorly optimised.

  2. jackjack Avatar
    jackjack

    No one with more than a single brain cell uses Vista.

    NO ONE.

    Hello ? Hello ?

  3. anas Avatar
    anas

    THANKS ITS A RAELLY POWERFULL TOOL I HAVE SAVED UP 1 GIGA

  4. paul Avatar
    paul

    Re: No one with more than a single brain cell uses Vista.

    Too bad Windows Server 2008 (not R2) is based on Vista, and SBS doesn’t have an R2 version 🙁

  5. Emo Avatar
    Emo

    Thank you for this tip.
    [b]COMPCLN.exe[/b] cleaned up 1.9 GB

    We desperately need competitive alternative to the Windows Totalitarian monarchy.

  6. josh Avatar
    josh

    Thanks for the comments! I’m glad to see that this has helped others and it’s really interesting to see how much space it has saved for the different people (400 MB, 1 GB, 1.9 GB).

  7. Cal Avatar
    Cal

    knocked 2.3 GB of my winsxs file but only 1.1 GB off my entire C: Drive. Is that normal?

  8. amgadelsaeigh Avatar
    amgadelsaeigh

    this command does not exist anymore in windows 7

  9. shakti Avatar
    shakti

    Lyon!!!! Thank you very much ;-). I have reduced around 1GB. this is great ideas.

  10. ab Avatar
    ab

    Thanks. I got back 2.3Gb!

  11. mustafa Avatar

    here is solve mate download defrag 14 and use it for frag files and get ur all free space i got back 40 gb 😀 :D:D:DD: wooow i love myself D: and this a favor from ur turkishh friend add me on facebook

  12. mustafa Avatar
    mustafa

    mustafa yanardağ 😀

  13. Andy-san Avatar
    Andy-san

    My file was at a whopping 17.9 GB; this knocked it down to 16.2. That will be at least somewhat helpful – thanks!

  14. Ernesto Avatar
    Ernesto

    Does this tool is also applicable for Windows 2008?

  15. josh Avatar
    josh

    @amgadelsaeigh: Thanks for the heads up on this not being applicable to Windows 7

    @Ernesto: I haven’t tested this on Windows 2008… you can always try it and let the rest of us know though! 😉

  16. darkflux Avatar
    darkflux

    @Cal:
    it’s normal for the size discrepancy if your files are compressed. decompress your C: drive and watch your speed increase!
    @Mustafa:
    i believe you are confused…defrag merely reorganizes files, not delete…

  17. Carl Avatar
    Carl

    Great, concise article. I saved about 3GB this way which I needed badly! Thanks Josh!

  18. ixul Avatar
    ixul

    Of course this does not (yet) exist in Windows 7 or Windows 2008 R2. A service pack has yet to be released for those operating systems !

  19. josh Avatar
    josh

    Windows SxS is used for more than just full-on service packs. As different libraries are installed or upgraded the SxS folder serves as an assembly cache for previous versions of the libraries. This means this could also apply to other ‘minor’ updates like security patches or even other updates (vendor/software).

  20. x Avatar
    x

    1.2 GB saved here.

  21. boofhead Avatar
    boofhead

    0.9 GB saved. Not as much as I’d hoped, but every little bit helps!

  22. Shan Avatar
    Shan

    About 1.5GB saved – thanks guys!!!

  23. Muqtada Avatar
    Muqtada

    What about Windows7??? how to clean it in win7, anyone help me:sad:

  24. Sunny Avatar
    Sunny

    Hi I Found How It Works In WIN7
    1.Open My Computer,
    2.Right Click on The Windows System Drive and Click on Properties
    3.Then From The Properties Dialog Click On “DisK Cleanup” in General Tab.
    4.Wait for a while to Open The “DisK Cleanup” Dialog.
    5.Now Here it has a Option On Lower Left “Clean up system files”.Click on it.
    6.”DisK Cleanup” Dialog will Re-Open. Now you will find “Service File Backup Files” in “Files to Delete” Box. Just Tick It Out and click Ok.
    7.A Conformation Pop-Up Will Open, Click “Delete Files” to Proceed.
    8.Its All Done.:D:D

  25. Sunny Avatar
    Sunny

    Here are the Screenshots, How to Do
    [img]http://sunnyboy.noads.biz/images/screenshot.jpg[/img]
    [img]http://sunnyboy.noads.biz/images/screenshot2.jpg[/img]
    [img]http://sunnyboy.noads.biz/images/screenshot3.jpg[/img]

  26. NIMZ Avatar
    NIMZ

    had file of 8.something
    brought down to 7.something
    thnx!!!

  27. cheap  computers Avatar
    cheap computers

    I really believe this step involving the size of this folder in windows vista to be a step backwards for Microsoft. How does a department go about creating and deploying windows 3rd party images to PC’s from a 20 GB Windows install with MS Office, I cannot believe MS took this route. ( Well it can be done but what a waste of time and disk space.)

  28. Kate Avatar
    Kate

    thanks for this information…i knocked the size of my winsxs folder down from 10.1gb to 8.2gb..im well chuffed…thanks again x x

  29. Meech Avatar
    Meech

    from over 22GB to 19GB yay??

  30. Vince Melling Avatar
    Vince Melling

    Thanks – used this and got back over 3Gb (running SP2)

    Now how do I get rid of all those dll’s that go with old versions of applications or applications that I have since uninstalled??? 🙂

    THinks, hunt for *.dll with a last access date of ???

  31. stan Avatar
    stan

    Thanks so lottttt!
    Got back 2.9GB from 22.8GB to 19.9GB out of my SSD 64GB Toshiba (Vista SP1)

    highy recommended!

  32. soy Avatar
    soy

    Thanx a lot ….. saved almost 2.5 GB !!

  33. data support Avatar
    data support

    sounds like its time to reinstall rather than go messing around

  34. Nick Avatar
    Nick

    The command is now called compact.exe . 😉

  35. u45 Avatar
    u45

    Saved 2.4 GB, thanks for the tip!

  36. Sherri Avatar
    Sherri

    Thanks so much, I could kiss you! X

  37. mcsnv Avatar
    mcsnv

    Went from 19.4GB down to 17.6GB… pretty sad that just a base install (Vista x64) with a small mixture of software uses up almost the entire space of an 80GB drive.

  38. ; Avatar
    ;

    It gave me a GB or more. Thanks

  39. Frank  Avatar
    Frank

    I found 2gigs of queued error reporting and will everything else i saved 5 gigs, thanks alot

  40. ATUL KHACHANE Avatar

    Thanks mate. COMPCLN.exe cleaned up GB’s of …..

  41. Mark Avatar
    Mark

    Win7 Ultimate -Had a 55 GB WinSXS folder….

  42. Nathan P Avatar

    I noticed a users comment “We desperately need competitive alternative to the Windows Totalitarian monarchy.”. Solution: It’s called Linux.

  43. The AWA Avatar
    The AWA

    Well done, Josh. With this tool, some have found a way to save some space on their hard drives.

    They’ve also made their PCs less reliable. Windows needs the WinSxS folder to keep software running despite requiring different DLLs by the same name.

    The AWA (Anti-Windows Alliance)

  44. daniel Avatar
    daniel

    My C drive doees not have a clan up button…and compcln is also not found, did any one done this onb windows 2008 R2?

  45. UKNN Avatar
    UKNN

    12.7 down to 10.7 – thanks for the tip!

  46. Angus Avatar
    Angus

    What a pile of horseshite. Microsoft are wankers.

  47. passpartout Avatar
    passpartout

    The disk cleanup has resized the winsxs folder, on my windows 7 system, from 12 gb (60000 files, 15000 folders) to 7.7 gb (45000 files, 12000 folders).
    Thank you!!!

  48. Joe Avatar
    Joe

    @Thanks for harming others

    If there were good programers in this world, winsxs folder would be unneeded. But on this world is a lot of bad programers. Programers who don’t follow standards and they don’t know or want to program correctly. This is the real reason for winsxs folder.

    Look at C++ it is over 30 years old and it still has 99% of compatibility. If i compile my 30 years old program with the newest compiler, compiler will without problem compile program and run it.
    Now do the same with dot.net program 1.0 and compile it with 4.0 i dare you! It’s just don’t work!

    So government should make a law which will ban all programing languages which don’t have 99% compatibility with original 1.0 version. So all programing languages as JAVA, C#, and all new age crap should be banned! Those languages are disgrace to all programers all over world!

    Just look at windows you have MFC30 MFC32 MFC40 MFC42,… files but if there would be good programers at Microsoft there would be only MFC file. And this file would be compatible with windows 3.1 and windows 7 programs! Same interface!

    Same problem you can see at JAVA – which is biggest garbage in this world! You program one application in java 1.1 the n java 1.2 comes and application don’t work, so you have to reprogram application in java 1.2. Same problems comes with 1.3 version and 1.4 and 1.5 and so on… Is this good programing practice?
    With this folder Microsoft is supporting bad programing practices!
    Programers with bad programing skills should be punished!
    There should be some programing council and programing exam same as there is Medical exam and Medical council. So only licensed people could program.

  49. Joel Avatar
    Joel

    Number of files dropped by about 10% (from 55k to 50k). Total space dropped 13.4gb to 11gb.

    Many thanks!

  50. Bhellsun Avatar
    Bhellsun

    Thanks a ton.. i freed 6gb of data. Just run disk clean up in windows 7 and select the big junk of files to be deleted.

  51. rob Avatar

    worked a treat, cheers:-)

  52. Vivek Avatar
    Vivek

    Please suggest … does above share procedure also work for window 7 (Home Basic) ……. if NO then please alternate way???

  53. dilum nilanjan Avatar
    dilum nilanjan

    go to start —-> all pro—>accessories—-> right click on cmd —-> run as administrator

    type cleanmgr /sageset:11

    select which you want to remove

    ok

    run disk clean up in c drive

    right click on the drive —> properties—> disk cleanup select types and ok

    to view size of folders

    run treeview or windirstat

  54. John Sheffield Avatar
    John Sheffield

    Thank you very much good to have good people giving good advise. I just gained 2 gb more space anther trick that helps me is to compress files to save space in the properties options but be careful not to compress vidios or pictures as they may not return to full size. washerguy

  55. Anil Mishra, Sanawad Avatar
    Anil Mishra, Sanawad

    Thnaks for your advice. After executing the program /tool i got about 1GB back on my C dRive.

Leave a Reply

Your email address will not be published. Required fields are marked *