Created: 12/15/19

As of the recent months Microsoft keeps releasing more and more updates and in some instances the C: drive keeps losing space. You add space to the volume thinking its SoftwareDistribution but nope it keeps growing, why?

One thing you can check is with WinDirStat or click here for the local download, and check to see if the WinSxS folder (“C:\Windows\WinSxS”) is growing it size.

In recent years Microsoft, with the released of Server 2012, added a cool new feature called “Features on Demand” which allows you to uninstall the binaries of roles and features on a server by removing them. What this does it reduces the amount of space used by these rather pointless files that are just taking up space and constantly being updated with each Windows Update.

Basically what you would do is this:

  1. Get-WindowsFeature *

  2. Find the features that are currently showing up as “Not Installed” and removing the binaries from the server

  3. Uninstall-WindowsFeature -Name <feature_name> -computerName <computer_name> -remove

Likewise if you don’t want to do this line for line, you could type this:

Get-WindowsFeature | where-object{$_.Installed eq 0 -and $_.InstallState -eq ‘Available’} | uninstall-WindowsFeature -Remove

Then just do a reboot, and you should have less crap in your WinSxS folder.