Skip to main content

How to Manage the Huge WinSxS Folder in Windows 10

winsxs-windows10

When your system disk space gets low, third-party utilities help you spot large files and collections of smaller files at a glance. That’s where you might stumble upon the WinSxS folder. It has a size of almost 5–10GB, and for many users, it’s like a black box in the Windows world.

Naturally, it raises the question of what exactly are those files installed in WinSxS and why it’s so huge. Web searches and forums are full of questions about this folder. Let’s demystify the secrets of WinSxS and the correct way to manage it.

WinSxS Explained

WinSxS (Side-by-Side) was created in response to solve the “DLL Hell” problem in Windows OS. In simple terms, it involves instances when any program alters the dynamic link library (DLL) file to affect the critical function of other applications that need to use the same DLL.

For example, assume that an app requires a DLL with version number 1.0.2. If another app replaces the resource with a different version, say 1.0.3, then the previous app which relies on version 1.0.2 will either crash, cause compatibility issues or worse result in the Blue Screen of Death.

Launch of WinSxS

Windows XP saw the proper launch of the component store. In this, each component (DLL, OCX, EXE) lives in a directory called WinSxS. It would store all the different versions of DLLs installed by software and hardware packages and load the correct version on demand.

So how does an app knows what version of a DLL it needs to load? This is where the “manifest file” plays an important role. It contains settings that inform the operating system how to handle a program when it starts and the correct version of DLL.

Each component has an identity with a unique name that may include processor architecture, language, version, and ID. Specific versions of these components are then collected together into packages. They’re used by Windows Update and DISM to keep your system up-to-date.

winsxs component packages in windows 10

This timeline shows a progressive improvement of WinSxS with each major OS upgrade.

timeline of winsxs improvement in Windows OS

The WinSxS Folder and the Role of Hard Links

Hard links are used throughout the Windows OS. In terms of WinSxS, it’s the only location where components live on the system. All the other instances of the files outside the component store are hard-linked to the WinSxS folder. So, what is a hard link?

According to Microsoft Docs, a hard link is a file system object which allows two files to refer to the same location on disk. It means that Windows can keep multiple copies of the same file without taking any extra space.

Whenever you update Windows, a whole new version of the component gets released and projects into the system through hard links. The older ones remain in the component store for reliability but with no hard links.

With the help of fsutil command, you can check the hard links of any system file. Press Win+X and choose Command Prompt (Admin), then type in

fsutil hardlink list [system file path]

For example, if I want to check the hard links of a system file called “audiosrv.dll,” then type in

fsutil hardlink list "C:\Windows\System32\audiosrv.dll"

fsutil hardlink list in command prompt

Importance of WinSxS

The component store plays a vital role in supporting the functions needed to customize and update Windows. These are as follows:

  • Recover your system from boot failure or corruption
  • Enable or disable Windows features on demand
  • Move systems between different Windows editions
  • Uninstall problematic updates
  • To install the new component versions using Windows Update

WinSxS Folder Size

WinSxS contains all the files necessary to maintain compatibility with hardware and software on your PC. One of the biggest strengths of Windows is its capacity to run older hardware and apps. But this legacy compatibility comes at the cost of disk space and bugs.

Navigate to the C:\Windows\WinSxS, right-click it and choose Properties. This folder consumes almost 7.3GB of disk space. But the thing is, that’s not the real size. The reason for that is “hard links” that File Explorer and other third-party tools don’t consider.

It counts each reference to a hard link as a single instance of the file for each location. So, if a system file resides in both WinSxS and System32 directory, File Explorer would inaccurately double the folder size.

winsxs folder size in Windows10

Check the Actual Size of WinSxS

To check the Windows component store’s actual size, open an elevated command prompt window and type in

Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore

Note: The /AnalyzeComponentStore option isn’t recognized on Windows 8 and earlier.

After the analysis, the actual size of the component store comes down to 5.37GB. This value factors in hard links within the WinSxS folder. Shared with Windows gives you the size of hard-linked files. Date of Last Cleanup is the date of the recently completed component store cleanup.

analyze the size of the component store in Windows10

Methods to Reduce the Size of the WinSxS Folder

Many users often ask if it’s possible to manually delete the files from the WinSxS folder. The answer is a Big No.

It will most likely damage Windows and critical Windows Update may fail to install properly. Even if you’re successful in removing files from the WinSxS folder, you never know which app will stop working.

You can though reduce the size of the WinSxS folder with a few in-built tools. We’ll use tools like Disk Cleanup, DISM commands, and remove Features on Demand to trim the WinSxS folder.

Disk Cleanup Tool

In the search box, type in disk cleanup, and select Disk Cleanup. From this window, click the Clean up system file button. That restarts the utility and unlock access to the full range of cleanup options. You can remove installation files, previous Windows versions, and more. Disk Cleanup tool is the starting point for cleaning up Windows 10.

disk cleanup tool in admin mode

Read this step-by-step guide to find out the best ways for cleaning Windows 10.

Remove Features on Demand

Windows lets you enable or disable default Windows features on demand. You can add some useful features—Hyper V, Print to PDF, Windows Subsystem for Linux (WSL), and more.

Features that you uncheck remain in the WinSxS folder and take up disk space. Users with a low amount of storage might want to slim their Windows installation as much as possible. Open an elevated command prompt window, and type in

DISM.exe /Online /English /Get-Features /Format:Table

You’ll see a list of feature names and their status

windows feature on demand list

To remove a feature from your system, type in

DISM.exe /Online /Disable-Feature /featurename:NAME /Remove

(Replace “NAME” with the name of the feature mentioned in the list)

remove a windows feature with DISM

If you run the /Get-Features command again, you’ll see the status as “Disabled with Payload Removed” instead of just “Disabled.” Later on, if you choose to install the removed components, Windows will prompt you to download the component files again.

DISM Component Cleanup

Windows 8/8.1 includes a built-in feature to automatically clean up the component store when the system is not in use. Open Task Scheduler and navigate to Microsoft > Windows > Servicing. Right-click the item and click Run.

startcomponentcleanup parameter in task scheduler

The task will wait at least 30 days after an updated component gets installed before uninstalling the previous version of the component. The task also has a one hour timeout and may not clean up all the files.

With DISM /Cleanup-Image parameter, you can immediately remove the previous version of the component (without a 30 day grace period) and do not have a one hour timeout limitation. Open Command Prompt (Admin) and type in

DISM.exe /online /Cleanup-Image /StartComponentCleanup

If you add ResetBase switch, you can remove all the superseded version of every component. But remember, you’ll not be able to uninstall any current updates (even if they’re faulty).

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

The following command will remove any backup components needed for the uninstallation of service packs. It’s a collection of cumulative updates for a particular release of Windows.

DISM.exe /online /Cleanup-Image /SPSuperseded

Delete Windows Files to Free Up Disk Space

WinSxS component store has an important role to play in the day-to-day functioning of Windows. So you shouldn’t delete the files, or move the WinSxS folder as a solution to your space problems. Windows upgrades have brought in-depth reporting and cleanup tools you can use to find the other space hogs instead.

If you follow the techniques as described above, you can reduce the size of the WinSxS folder slightly. Read this piece to find out Windows files and folders you can delete to further free up disk space.

Read the full article: How to Manage the Huge WinSxS Folder in Windows 10

Comments

Popular posts from this blog

The Best 10 Social Media Platforms for Photographers to Flaunt Their Talent

Social media offers an excellent opportunity for photographers to connect with potential clients. In the digital era, it's a great asset. By showcasing your work on these networks, you can reach new audiences. Whether you are a professional or freelance photographer, the following social platforms will help you show off your work and get the right people to take notice... 1. Behance Behance is a classic portfolio publishing network that functions like a LinkedIn for creatives. Designed by Adobe, this is one of the best photography networking sites currently out there. The platform is ideal for sharing your portfolio and favorite images, allowing other Behance users to like and comment on your photos. By learning from their feedback and professional critiques, you can improve your work. The coolest feature of Behance is that it lets you find professional gig opportunities right on the platform. With your portfolio already available on the site, getting work becomes effortless.

The 6 Best Platforms for Sharing Your Digital Art Online

Whether you're looking for somewhere to host your digital art portfolio or simply want to share your latest artworks, it can be difficult to choose a website to upload to. Or at least, it definitely is more so than before, now that art websites aren't bubbling with as much excitement as they used to be. You know that each site has its pros and cons, but it's hard to figure out what those are unless you make an account and see for yourself. Don't worry if you don't have time for that—we've got your back. Here are the websites we recommend for sharing digital art, and why you might want to consider them. 1. Pixiv If you were around when the online art scene was ridiculously active, chances are that your art style is influenced by anime and/or manga in some way. Otaku culture began its slow sneak into mainstream media back then, and Pixiv is a great home for artists that fall in that category. Pixiv started as a small online community based in Japan, but has s

Snapchat Suspends Two Anonymous Messaging Apps Over Cyberbullying Claims

In light of a lawsuit that was filed earlier, two Snapchat apps, Yolo and LMK have been suspended by Snap. The apps allowed users to send anonymous messages on the platform. The Lawsuit Calls for an Immediate Ban of Yolo and LMK According to a LA Times report, the lawsuit was filed on behalf of Kristin Bride, the mother of a teen who committed suicide in 2020. The lawsuit alleges that Bride's son took his own life after being cyberbullied via Yolo and LMK. In addition to this, the lawsuit alleges that Yolo and LMK aren't doing enough to tackle cyberbullying, and have consequently violated consumer protection law as well as their own terms of service and policies. Both apps use Snap Kit, a set of tools that allows developers to directly connect to Snapchat for better integration features. Today the family of a 16-year-old Oregon boy who took his own life after being cyberbullied sued Snap and the makers of apps YOLO and LMK, alleging that the companies should be "h