useful command to reclaim some space from winsxs folder (great for SSDs)

vshah

Lifer
Sep 20, 2003
19,003
24
81
If you installed Windows 7, and then subsequently upgraded to SP1, there are a lot of backup files in your C:\Windows\winsxs folder that are no longer needed.

running the following command in an elevated command prompt will remove these backups:

Code:
dism /online /cleanup-image /spsuperseded
I've used this successfully on a few machines with no adverse effects. I reclaimed anywhere between 3-5gb, which is great on an 80gb drive. However, please note that you are running this at your own risk.
 

jjmIII

Diamond Member
Mar 13, 2001
8,399
1
81
Or use 'clean up system files' under disk cleanup. That will add SP files to a normal disk cleanup.
 

pcslookout

Lifer
Mar 18, 2007
11,959
157
106
in the future, i'll definitely be doing that. but no point reinstalling windows when a simple command will also free up the space.

Yeah but I thought geeks reinstall everything when they get new hardware. This could never be so much more true with a SSD. It is always recommended but not required.
 

vshah

Lifer
Sep 20, 2003
19,003
24
81
Yeah but I thought geeks reinstall everything when they get new hardware. This could never be so much more true with a SSD. It is always recommended but not required.

Many of us bought our SSDs before SP1 came out.
 

Coup27

Platinum Member
Jul 17, 2010
2,140
3
81
Just reclaimed 3.1GB by clearing out SP1 backup files. Cheers
 

fuzzymath10

Senior member
Feb 17, 2010
520
2
81
For me having an SSD lessens the need to reformat because it masks the time to load all the files which normally take forever to load on a mechanical drive. Memory is not an issue so I hardly care what loads as long as it isn't malignant. This is why SSDs are perfect for typical users who lose track of what they install and wonder why their system feels slow.
 

groberts101

Golden Member
Mar 17, 2011
1,390
0
0
crap cleaner(now CCleaner) can be configured to do all this and far more as well.

EDIT:.. my bad. CCleaner will not access this folder but after more research on this subject.. I would highly recommend that some do a bit better research before removing the entire contents of this folder.

This is just one of many that talks about the adverse affects of removing some of that content.
http://answers.microsoft.com/en-us/...-to-free/450e0396-6ba6-4078-8ca0-b16bf4e22ccf


this..
There have been several blogs and even some “underground” tools that tell you it’s ok to delete the WinSxS directory, and it’s certainly true that after installation, you can remove it from the system and it will appear that the system boots and runs fine. But as described above, this is a very bad practice, as you’re removing the ability to reliably service, all operating system components and the ability to update or configure optional components on your system. Windows Vista only supports the WinSxS directory on the physical drive in its originally installed location. The risks far outweigh the gains removing it or relocating it from the system,
is from here.. http://www.winvistaclub.com/f16.html

and another for those really into reading/learning.
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.
http://blogs.technet.com/b/askcore/...and-windows-vista-and-why-is-it-so-large.aspx

in essence what this guy^ is saying is that the older the OS becomes?.. the larger the file gets. Sure adds credence to the thought of re-imaging a few times per year when it's looked at like that. Who doesn't like fresh OS performance without all the bloat and need to reinstall all the major staples(apps), right?
 
Last edited:

Phynaz

Lifer
Mar 13, 2006
10,140
819
126
Horrible idea to touch this folder. You will most likely break your OS install.
 

Coup27

Platinum Member
Jul 17, 2010
2,140
3
81
I've read more than one article before on the Winxs folder which is why I followed jjmIII's method and used system cleanup to delete my SP1 backup files. Can't see how that can hurt.
 

greenhawk

Platinum Member
Feb 23, 2011
2,007
1
71
mine before the last re-install of windows was 15+GB, but it is a 80GB SSD, so quite noticable.

On checking up, quite a few programs around to do something with the SxS directory, but all microsoft posts basically say "LEAVE IT ALONE".

At the same time though, SP1 was ment to have a command that cleaned up on install IIRC, but did not work for most people for some reason.