winsxs-consuming-spaceIf you have worked on Windows for more than a few years you will know that C:\Windows\WinSXS takes up an ever increasing amount of disk space and that you should not delete anything from it.   Microsoft says:

One commonly asked question is, “Can I delete the WinSxS folder to regain some disk space?” The short answer is no. You can, however, reduce the size of the WinSxS folder using tools built into Windows. For more information about the WinSxS folder, see Manage the Component Store.  Windows 10 and Windows Server 2016 automatically reduce the size of the WinSxS folder…

So how do you clean up previous versions of Windows like Server 2012 or Windows 8?  The answer is with a DISM (which stands for Deployment Image Servicing and Management) command in an elevated PowerShell Window:

dism.exe /Online /Cleanup-Image /StartComponentCleanup

/Online tells DISM tells it to work on the running operating system (as opposed to an offline .WIM file)

/Cleanup-Image allows DISM to use other commands, in this case /StartComponentCleanup

/StartComponentCleanup deletes old updates that have been superseded by newer updates

After the DISM has run the system must be rebooted for the surplus files to be removed.  In other-words, you won’t notice a change until you reboot.

There are several other good references if you still have questions:


Questions or Comments?