What Is the WinSxS Folder, Why Is It Huge, and How to Cleanup?

Plus what the correct size should be

A Windows user’s pursuit of storage is never-ending. Clean up the PC in January, and your storage space will max out again before springtime. As you dig deeper to find what’s consuming that disk space, you’re likely to come across the WinSxS folder on your Windows computer.

What Is the WinSxS folder?

WinSxS (short for “Windows Side by Side”) is a folder (location: C:\Windows\WinSxS) where Windows stores files required for installing Windowsandbackups or versions of those files.

Whenever you need torecover system filesor add or remove Windows features, this is where Windows will search for the files required to perform an action. This is why it’s also called the component store.

WinSxS also stores files needed to install quality updates and previous versions of Windows components. These files allow you to revert back to the last state in case the update becomes troublesome.

WinSxS continues to increase in size over time because it will continue storing more component versions.

What Is the Correct Size of WinSxS?

The size of the WinSxS folder is usually calculated inaccurately by the File Explorer.

Files inside the WinSxS folder may appear in several places in the operating system. However, there’s usually only one copy of a file, while the rest of the files arehard links.

File Explorer doesn’t factor this in when calculating the size of folders, meaning the size can appear larger than it really is.

You can find the true size of the WinSxS folder using the DISM tool. To find the real size, launch an elevated Command Prompt and run the following command:

DISM.exe /Online /Cleanup-Image /AnalyzeComponentStore

Once the process completes, you’ll see both the size reported by the file explorer and the actual size in the Command Prompt window:

How to Cleanup WinSxS Folder?

Cleaning the component store can free up valuable storage on your hard drive.

However, you can’t delete the WinSxS folder manually. Also, note that once you clean up the WinSxS folder, you won’t be able to roll back updates until you’ve updated your PC.

You might also face issues with certain apps that rely on a previous version of a DLL file if it gets deleted during the cleanup.

As illustrated below, there are several ways to clean up the WinSxS folder.

DISM (Deployment Image Servicing and Management) is a command-line utility with a built-in option for cleaning up the component store. A cleanup using DISM will remove all the unnecessary files from the WinSxS directory without disrupting your system’s functioning.

DISM.exe /Online /Cleanup-Image /AnalyzeComponentStore

DISM.exe /Online /Cleanup-Image /StartComponentCleanup

When the process completes, it will have cleaned all unnecessary WinSxS files.

There are also other WinSxS cleanup commands you can run when you want to clean up a specific group of files. For instance, if you want to clean up older Windows component versions, run the following command:

DISM.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase

If you’re running an older version of Windows like Windows 7, you can use the following command to remove service pack backups (Windows 8, 10, and 11 don’t have service packs):

DISM.exe /Online /Cleanup-Image /StartComponentCleanup /SPSuperseded

Windows also has a built-in Disk Cleanup tool that canclean up system filesand other types of unnecessary files, including ones in the WinSxS folder.

You can check all boxes if you want to clean up junk from the entire system, but be sure to select Windows Update Cleanup for cleaning up the update files from the WinSxS folder. ClickOKonce selected.

Of course, over time, the files will accumulate in the WinSxS folder again. So you’ll need to use Disk Cleanup every once in a while to keep the WinSxS folder clean. Alternatively, you can schedule component cleanup using the Task Scheduler.

You canuse the Task Schedulerif you want to take a “set it, forget it” approach to regularly clean the WinSxS folder.

Need More Space?

If you’re trying to make some space on your hard drive, cleaning up the WinSxS folder is a great start. You can also make more space byuninstalling appsyou don’t use or moving large personal files to an external hard drive.

If you’re looking for more ways to make space on your Windows computer, we have a tutorial on severalways to free up disk spacethat might help.

Arjun is a freelance writer based in India. After working as an equity research analyst, Arjun decided to do something that he has been passionate about – tech. He gets excited talking about and explaining how to solve everyday tech problems. His area of expertise is Windows and is a go-to for all things Excel.Read Arjun’s Full Bio

Welcome to Help Desk Geek- a blog full of tech tips from trusted tech experts. We have thousands of articles and guides to help you troubleshoot any issue. Our articles have been read over 150 million times since we launched in 2008.

HomeAbout UsEditorial StandardsContact UsTerms of Use

Copyright © 2008-2024 Help Desk Geek.com, LLC All Rights Reserved