TL; DR
O winsxs na verdade contém links físicos . Ele não ocupa tantos dados adicionais quanto você pensa.
Um link físico é como um 'atalho' ou 'ponteiro' para um arquivo real localizado em algum lugar no seu disco. Um link físico não ocupa espaço no disco rígido por si só: serve apenas como um redirecionamento.
Como o winsxs consiste em links físicos, a exclusão desses links não liberará espaço algum. Os arquivos atuais continuarão a permanecer em vários locais no seu disco.
winsxs não é um problema
... é uma solução! (Bem, principalmente .)
Um resumo, "Marcado como Resposta por Ronnie Vernon, MVP, Moderador", diz aqui :
Wow, long discussion about hardlinks and winsxs. Anyway here are some
summarized points of what I understood about how all of it works.
To start by answering the OP's question with the perfect answer posted
above by Andre.Ziegler, you don't touch winsxs. Maybe some of the
files can be trimmed like the mp3's, avi's, etc but the rest of the
system files should be left alone. I too am using Link Shell Extension
as posted above by Ronnie Vernon, easy way to see which are hard
linked (red arrow) and which are simple files.
Before getting here I saw in a lot of places people asking for the
cleanup tool after installing SP1 for Windows 7 like vsp1cln. There is
no dedicated tool, it all got integrated into the Disk Cleanup
service. One note that I would make here is that even if the option
says it will remove a few hundreds of MB after I cleaned up my drive
the service removed around 3GB of excess files, so it varies from
system to system. Funny, now I have even more space than I had before
installing SP1. Nice one, MS.
Regarding the hard links, I got amused by the confusion created around
them. I'm not a linux geek, and I usually use only soft links...
they're enough for me, but people didn't get how the hard ones work
and how size is counted.
A group of selected files, links or not, will always be counted as a
sum. This means that if I take a 10MB file, and make 2 hard links, the
selection of all three of them will have 30MB and this is the correct
size, because unlike the soft links which are related to the file's
original Master File Table entry and have 0 bytes, hard links are
related to the data itself, have their own entry in MFT but point to
the same data address, obviously having as size the size of the actual
data, same times, attributes and so on. Why, below.
How much is left on the drive? Simple: exactly as much as the drive's
own properties reports. Don't go selecting all the files, hidden and
non hidden on C and making comparisons, or using tools that do that
automatically because it won't show the actual HDD usage. Why?
Because:
- that operation makes a list of all the selected files including hard links as separate files, takes each of them and adds the sizes
up, the drives properties counts the actual stored data
- not all the files will be counted, folders protected from traversing and files from reading will not be counted and the System
Volume Information usually has very large files protected just in this
manner
- that number is useful only in cases of file transfer, if the files, links, etc need to be copied to DVD or NAS, that's how much they would
occupy, and the links will not be preserved since they are NTFS
specific features, not available or available in different forms under
ISO, UDF, NFS and other file systems, but they will be cloned.
Make a test... copy a 10MB file, a.exe, from a different drive and
notice how the free space drops by the 10MB. Make a hard link (mklink
/H b.exe a.exe). Now these two files selected will "use" 20MB in the
selection properties, but actually only 10MB verified at the drive's
properties, which will have the same free space as it did/does after
the file copy. Delete one, either one, the free space will remain the
same. Now delete the last one and the space will increase by 10MB. Was
there any harm done? NO.
What is winsxs? A much better dllcache. Where with the dllcache in XP
we had copies of files that actually added to the size usage since
they were cloned, this actually improves usage but not total
protection (against viruses). If a rogue uninstaller thinks it has to
remove some runtime libs from System32, it would only delete the
links, but not the data, then the links would be recreated while
keeping data space usage at lowest possible, better than archiving
winsxs in cabs and having the cabs along side the original files. Also
winsxs bring serialization, compartmentalizing files with the same
name but different version, for the dev's sake, which is a good thing
/ bad thing, it makes them lazy to code properly but it helps when
they don't want to code anymore.
I did this to help anyone that lands here out of the same reasons I
did... excessive "usage of space" by winsxs after SP1. And I hope it
was helpful.