How to Clean Up Component Store (WinSxS folder) in Windows 10

When searching for disk space hogs, users often come across the WinSxS folder, a seemingly hefty file that Windows Explorer tells them is 8GB+ and contains tens of thousands of files. They’ll quickly find there’s no way to delete WinSxS entirely (for good reason) but it is possible to clean WinSxS to free up some space.

What is WinSxS?

The WinSxS folder, also known as the component store, holds all essential Windows components. Though you may see such components elsewhere in Windows 10, in reality, they’re just links back to WinSxS, which handles the heavy lifting.

As a result, deleting WinSxS would not be good. There’s a good chance your system would be unable to boot, and as WinSxS also contains backups of older component versions, you may not be able to repair, either.

However, that’s not to say the Windows SxS folder doesn’t contain files you don’t need. It keeps older versions in case you need to roll back to an older version of Windows 10, which means it grows with each Windows Update. If you’re happy with your system stability, it’s possible to perform a WinSxS folder cleanup and regain some space.

Generally, Windows 10 is quite good at doing this automatically, but if you need space right now, you may not have time to wait for its scheduled maintenance. We’re going to show you how to safely clean WinSxS so you can get your system running smoothly again.

How to Cleanup WinSxS in Windows 10 with Task Scheduler

The most user-friendly way to clean WinSxS is Windows 10’s built-in Task Scheduler app.

  1. Open Task Scheduler


    Press “Windows + R” to open the ‘Run’ dialog, type “taskschd.msc”, and press “Enter”.

    Windows 10 - Open Run - Task Scheduler

  2. Navigate to the Windows Servicing folder and run WinSxS folder cleanup


    Using Task Scheduler’s left sidebar, make your way to Task Scheduler Library\Microsoft\Windows\Servicing. Find “StartComponentCleanup” and click “Run”.

    Windows 10 - Run - Servicing - Start Component Cleanup - Running

  3. Wait for the Windows Component Clean tool to run


    The Windows Component Clean tool when then start to clear up your files, which you’ll note when the status in Task Scheduler changes from “Ready” to “Running”. It may take some time to fully complete.

    Windows 10 - Task Scheduler - Servicing - Run Start Component Cleanup

How to Cleanup WinSxS with the StartComponentCleanup Command

The Command Prompt is often a faster way to get things done. Those familiar with the tool or without UI access can perform a WinSxS folder cleanup via two DISM methods. The first gives similar results to the Task Scheduler:

  1. Open an elevated Command Prompt


    Press the “Start” button and type “Command Prompt”. Windows will automatically select the program and you can click “Run as administrator”.

    Windows 10 - Open Elevated Command Prompt

  2. Run the Windows Component Clean tool from the command-line


    Type the command Dism.exe /online /Cleanup-Image /StartComponentCleanup and press “Enter”. It will return a progress bar. Wait for it to finish and close the window when ready.

    Windows 10 - Elevated Command Prompt - Enter the Command

How to Clean up the Component Store and Delete All Old Component Versions

If you’d like a little more space and are happy to risk being unable to roll back, you can also use DISM to delete all older Windows component versions. Doing so will mean you’re unable to uninstall updates.

  1. Open an elevated Command Prompt


    Press the “Start” button and type “Command Prompt”. Windows will automatically select the program and you can click “Run as administrator”.

    Windows 10 - Open Elevated Command Prompt

  2. Run the WinSxS clean up tool with the Reset Base command


    Type the following command:

    Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase

    Press “Enter” and wait for it to complete.

    Windows 10 - Elevated Command Prompt - Enter the Command

How to Clear Service Pack Backup Components via DISM

Those who are on older Windows versions can also remove backups of Service Pack components that are retained in case of uninstallation. As Windows 10 doesn’t have Service Packs, this won’t be necessary for most people.

  1. Open an elevated Command Prompt


    Press the “Start” button and type “Command Prompt”. Windows will automatically select the program and you can click “Run as administrator”.

    Windows 10 - Open Elevated Command Prompt

  2. Enter the WinSxS Service Pack Clean Command


    In the Command Prompt window, type the following and press “Enter”:

    Dism.exe /online /Cleanup-Image /SPSuperseded

    Wait for it to finish and close Command Prompt.

    Windows 10 - Elevated Command Prompt - Enter the Command

How to Perform an Extended Disk Cleanup to Free Up More Space

You can reduce your Windows Component size and delete other unnecessary Windows 10 files via the Disk Cleanup tool. Here’s a full tutorial, or you can read our quick guide below:

  1. Open an elevated Command Prompt


    Press the “Start” button and type “Command Prompt”. Windows will automatically select the program and you can click “Run as administrator”.

    Windows 10 - Open Elevated Command Prompt

  2. Run the cleanmgr command and free up space


    In the command window, type the following and press “Enter” on your keyboard.

    cmd.exe /c Cleanmgr /sageset:65535 & Cleanmgr /sagerun:65535

    Windows 10 will then launch the Extended Disk Cleanup tool. Tick the files you’d like to remove, including “Windows Update Cleanup” if you want to delete WinSxS files. Wait for the process to complete, keeping Command Prompt open while it does so.

    Windows 10 - Command Prompt - cmd.exe cleanmgr