winsxs-consuming-space

If 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…
SOURCE

So how do you clean up previous versions of Windows like Server 2016, 2019, 2022 or Windows 10 and Windows 11?  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:



0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *