Windows 7: WinSxS folder is huge, can I delete it?

It’s one of the most asked questions about Windows 7 and the answer is simple, absolutely not! There are few directories in the Windows 7 system root directory that you can delete without repercussion. All of the components in the operating system are found in the WinSxS folder. 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. An example of hard linking would be having a file called File1.exe (size 10MBs) located in C:\Windows\WinSxS. You can use a command in Windows 7 called mklink to create a hard link of File1.exe in say C:\Files. So when you look in C:\Files you will see File1.exe at a size of 10MBs but this is an “illusion” :P What you are seeing is a link to the file in C:\Windows\WinSxS. So File1.exe is not taking up 20MBs of disk space by being in two places, it is actually still only taking up 10MBs. So, although you may see files in various folders on your computer taking up diskspace they are really located just once in the WinSxS folder.

That explains why the folder starts off big, but not why it gets larger over time – the answer pretty simple. When a component is updated then new version is “projected” or hardlinked onto the system but the old version of the component is kept. So the more a component gets updated, the more previous versions there are of that component.

So to finish. Do not mess with the WinSxS folder :)

Update: After installing Windows 7 SP1 it is possible to reclaim a few GB’s of space by making SP1 permanent and removing older files and SP1 install files. To do this open and command prompt as Administrator (Click Start button, type cmd in search box, right click on cmd.exe and select run as Administrator) and run the following command… dism /online /cleanup-image /spsuperseded
This will run for for about 15 – 20 min (even though it says its at 100%) and when its down you should have reclaimed some disk space.
This entry was posted in DaytoDay and tagged , , , , , . Bookmark the permalink.

14 Responses to Windows 7: WinSxS folder is huge, can I delete it?

  1. Mark says:

    Here is what you need to do to clean it(works in win 7 Ult, not tested in vista or other oses):
    open command prompt as admin, then type:

    dism /online /cleanup-image /spsuperseded


  2. Gorr says:

    I’ve tried Windows 7..3 times now… to be’s an over bloated too many bells and whistles piece of **** and OMG that winsxs folder it was 6 gigs…. what’s the point? My W7 install alone was 14 gigs…… that’s more than the total amount of programs I have…..It’s simply amazing what people with a crap load of money do. I’m back to windows xp….again… :) The software industry is going to H*** in a hand basket.

  3. William says:

    My current winsxs folder is at 30GB, so is there no solution still to this over bloating of files?

  4. sunjeet says:

    my also ……. 17 gb ,,,,,

  5. Lisa says:

    my WinSxS file is 69.2 MB (72,613,888 bytes) in Windows XP. I will not delete any files.

  6. Jacob says:

    I think this article will be helpful too. I had the same problem and it helped me clean a few gigs. I still think it is taking a lot of space but it helped.

  7. rangana says:

    i ran the command as it is but it did not work.

    Error: 87
    the cleanup option is unknown
    for more information refer to the help by DISM. exe / ?.
    the didm log file can be found at c:/windows……..etc………………….

    please help.

  8. Mohamed Saad says:

    when i try to execute the command its ok but dont finish and display this message :
    no disk space on drive c
    what can I do ?

  9. Misho says:

    I deleted winsxs 10gb and windows not won’t start :)

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>