Clearing WinSxS Folder
Introduction
The Windows SideBySide (WinSxS) folder is a folder in C:\Windows on all Windows installations. It's the home of many component files that are affected by updates. Old versions of component files are kept in WinSxS after updates. Occasionally the WinSxS folder can end up ballooning in size. Normally a scheduled task would prevent this but in the event that it doesn't, it's possible to forcibly shrink the folder.
It is imperative that you do not ever manually alter the contents of this folder as doing so will disrupt Windows to the point of requiring a full re-imaging / re-install.
Clearing WinSxS contents
Clean up the filesystem first
Due to the way that the command that actually cleans WinSxS up works, it's beneficial to first run a different but related command to reduce the number of files that the command after has to iterate through.
We start by running, in an administrator command prompt, DISM /online /Cleanup-Image /StartComponentCleanup.
This could take anywhere from five minutes to an hour. After this is done running, we run it again with an additional flag:
DISM /online /Cleanup-Image /StartComponentCleanup /ResetBase
Note that while this will clear up dramatic amounts of storage, it will also lead to no longer being able to rollback to any previous updates as those files are what we're deleting here. Only attempt this if Windows is otherwise functional.