How to clean the WinSxS folder in Windows 10 and Windows 11
How to clean the WinSxS folder

There are many elements in modern versions of Windows that irritate users, and one of the most cited is the disk space consumed by the WinSxS folder. The "Side by Side" technology aims to avoid the famous DLL hell that plagued old versions of Windows, but on some installations, the folder's size reaches terrifying levels. In theory, the operating system automatically maintains that section, but if you want to know how to manually clean the WinSxS folder in Windows 10 and Windows 11, you're in the right place.

One of the most important details to absorb about the WinSxS folder is that the reported size is not the real one. Its technology relies heavily on hard links, objects that allow two items to use the same data on disk. This causes File Explorer in Windows and other similar tools to make errors when determining the size of WinSxS.

However… the folder is still enormous, especially on Windows installations that have accumulated several years. Fortunately, manually cleaning the WinSxS folder in Windows 10 and Windows 11 is very simple. All you have to do is open PowerShell with elevated privileges and run a single command.

How to clean the WinSxS folder in Windows manually

  • Open PowerShell with elevated privileges. The classic system console (cmd.exe) will also work in this case, as long as you run it as administrator.
  • The exact command to clean the WinSxS folder is "Dism.exe /online /Cleanup-Image /StartComponentCleanup", without the quotes. Don't hesitate to copy and paste to save time.
  • The "Deployment Image Servicing and Management" tool will begin its work. If your Windows installation receives frequent maintenance, the cleanup will last a few minutes. Otherwise, you might have to wait up to a couple of hours, especially if the computer uses a hard drive.
How to clean the WinSxS folder in Windows 10 and Windows 11
The exact command in PowerShell. It also works in cmd.exe.
How to clean the WinSxS folder in Windows 10 and Windows 11
Before...
How to clean the WinSxS folder in Windows 10 and Windows 11
... and after. On other installations, the difference is much larger.

Once the cleanup is finished, it's enough to close PowerShell or the console. We are not forced to reboot, and the changes will be immediate. How much space can we recover this way? The answer is a big "it depends." In our test session, we managed to free less than a gigabyte, but there are reports of a reduction close to 50 percent. Try it! Cleaning the WinSxS folder is a safe process and only uses official tools.