Why does a Windows 7 installation grow so seriously and how to shrink it?

The winsxs file can not be moved/removed, windows needs it to run to store old DLL versions of files. Most tools will report the size of the windows directory incorrectly due to the fact that the winsxs folder uses hard links so the file may show up in two places but it only takes up the HD space once (Windows explorer, SpaceMonger, and WinDirStat all report this the "incorrect" way) so it is not taking up as much as you think.

SysInternal's Disk Useage can give you the "real" amount, you can have it enumerate the entire windows directory (as administrator) and it will count hard links once.

enter image description heredu included a few more files than the windows properties screen, that is why it is not exactly the same numbers for the -u switch

Adding the -u switch makes it behave like windows explorer (or 99.9% of all other programs) and the files that use hard links are counted every time it sees it. You can see that if you exclude hard linked duplicates the program is reporting 4.5 extra GB* that simply does not exist because it is being double counted.


There is one thing you can do to shrink the size if you have not done it yet, When you apply the Windows Service Packs it keeps the old files around in the event you ever need to uninstall the SP. You can remove those uninstall files and free up a chunk of space by running the following command in a administrative console (Start the console with a right click->Run As Adiministrator)

dism /online /cleanup-image /spsuperseded

This will remove those uninstall files and possibly free up several GB.


* 1 GB = 1 x 1024 x 1024 x 1024 Bytes


You answered on your own questions. Visual studio installs huge amount of different packages, required for MVS. The other thing, is that most of MS apps makes cache for install files/updated files on your PC. Make visible all files and delete MSOCACHE in root of your C:\. Then check/google where visual studio cache files(if any exists). And after run disk cleanup, to delete all temp files. Also cleaning browser cache would give you some space