Many Windows Server 2012 users may not know what the WinSxS folder is used for, even though it can take up so much storage space. It’s important to know that the contents of the WinSxS folder shouldn’t simply be deleted, as this can sig­nif­i­cant­ly impair the system’s func­tion­al­i­ty. In this article, we show you how you can reduce the size of WinSxS without harming your system.

Cloud Backup powered by Acronis
Mitigate downtime with total workload pro­tec­tion
  • Automatic backup & easy recovery
  • Intuitive sched­ul­ing and man­age­ment
  • AI-based threat pro­tec­tion

How to clean up the WinSxS folder step by step

To clean up the WinSxS folder, you can use the command line tool dism.exe. The following steps show you how to proceed:

Step 1

To be able to run dism.exe, you need ad­min­is­tra­tor rights. Press the [Windows] key and enter “cmd” to search for the Windows command prompt. Now click on “Run as ad­min­is­tra­tor”, which is located on the right.

Step 2

Use the command Dism.exe /Online /Cleanup-Image /An­a­lyze­Com­po­nentStore to start the WinSxS folder analysis to find out how much storage space is actually being used. Then enter the command Dism.exe /Online /Cleanup-Image /sp­su­per­seded to start the cleanup process.

Tip

To delete saved Windows updates, you can also enter the command Dism.exe /Online /Cleanup-Image /Start­Com­po­nent­Cleanup. However, only do this if your system is already running stably, as it will no longer be possible to go back to an older version afterward!

Image: Result of using the “Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore” command
You can use the command “Dism.exe /Online /Cleanup-Image /An­a­lyze­Com­po­nentStore” to analyze the WinSxS folder and find out how much storage space is being used.
Note

The WinSxS folder also performs important tasks for the system in the desktop version of Windows and can take up a lot of disk space. However, the steps for reducing the size of the WinSxS folder on the desktop version differ slightly compared to the server version. We will show you how to clean up WinSxS on Windows 10.

How to reduce the size of the WinSxS folder

If you do not want to clean up the WinSxS folder, but only reduce its size, you can simply use the normal hard disk cleaning function. Use the cleanmgr tool for this.

Step 1

Press the [Windows] key and search for cleanmgr. Al­ter­na­tive­ly, you can start the ap­pli­ca­tion via the “Run” dialog, which you open via [Windows] + [R].

Step 2

Select the system drive (C:) in the drive selection. If your system only has one drive, this step will be skipped.

Step 3

In the next window, click on “Clean up system files” and wait until the process is complete.

Image: Disk cleanup for the C drive
Click on “Clean up system files”

Now select the system files you would like to delete. Click on “OK” to delete the selected files. This process may take a few minutes, depending on how much storage space is freed up.

Image: Select the system files to be deleted
Select the system files you want to delete.

Details about the WinSxS folder

WinSxS is a system folder in Windows. That’s why it’s located on the system partition. WinSxS stands for “Windows Side by Side,” which is a good de­scrip­tion of the folder’s purpose since the different versions of files are stored together, side by side. The folder is also called the component store. It primarily contains system files and can be several gigabytes in size.

Functions of the WinSxS folder

The WinSxS folder stores the necessary files for system recovery. Specif­i­cal­ly, it allows for the following ap­pli­ca­tions:

  • Si­mul­ta­ne­ous­ly saving different versions of Dynamic Link Libraries (DLLs) and other system files. Older ap­pli­ca­tions may not be com­pat­i­ble with changes in DLLs. Therefore, different versions are stored in the WinSxS folder at the same time.
  • Enabling and disabling functions while Windows is running, Hyper-V and the cor­re­spond­ing sandbox system, can be enabled without having to be installed sep­a­rate­ly. The necessary files can also be found in this location.
  • Adding roles in server operating systems: Functions in Windows server operating systems are also known as roles. For example, the server can play the role of a DHCP server on the network. The WinSxS folder is also used for these ex­ten­sions.
  • Restoring the system in the event of boot problems: If the operating system stops booting, it can be booted in recovery mode. This allows you to recover older versions of system programs.
  • Unin­stalling prob­lem­at­ic updates: When Windows runs an update, it saves the previous version rather than deleting it so that it can be restored in case problems arise later.

Al­ter­na­tives for saving disk space

If reducing the size of the WinSxS folder isn’t enough, there are other ways to free up disk space:

  • Disable system hi­ber­na­tion: Windows creates a snapshot of your system for hi­ber­na­tion mode. This file is called hiberfil.sys and often uses con­sid­er­able amounts of disk space.
  • Move user profiles to another drive: If you want to avoid re­in­stalling your system, you can change the location of your user profile sub-folders on the “Location” tab via Prop­er­ties, which you open from the context menu of a folder. You can also move user profiles to a different drive such as a new hard drive.
  • Move program folders: You can usually install space-intensive programs on other drives.
  • Remove un­nec­es­sary programs and functions using the “Apps & Features” option in the Control Panel.
  • Delete un­nec­es­sary folders such as Windows.old.
  • Disable restore points.

Sometimes cleaning up Windows folders isn’t enough. In these cases, re­in­stalling or resetting your system is a better al­ter­na­tive. There are also reset options that don’t remove your installed programs or personal files.

Why can’t you simply delete WinSxS?

Windows stores important system in­for­ma­tion in the WinSxS folder. If you delete or move the folder, certain processes may not be able to run properly. Why is that?

Disk drives in Windows

By default, Windows is installed on the first partition of the hard drive you’re using. These par­ti­tions are called disk drives or volumes. Together, they form a complete storage device. The first partition of a hard drive is usually given the drive letter “C.” The C:\Windows\ path contains most of the files and folders relevant to the operating system, including the WinSxS folder.

This content cannot be easily moved to other disk drives because com­po­nents of the operating system will no longer find it. Therefore, it’s important to provide suf­fi­cient disk space for the system partition during in­stal­la­tion.

Fact

The disk space of a hard drive must be managed in struc­tures that are com­pat­i­ble with the operating system. One or more par­ti­tions are created for this purpose. Disk space is par­ti­tioned logically. Each partition is formatted with a file system that manages the folder struc­tures and files, including their metadata. The hard drive has a partition table that lists all par­ti­tions.

Updates, service packs, and hotfixes

Operating systems and other ap­pli­ca­tions have long ceased to be rigid entities that are installed once and then used for years. Due to their com­plex­i­ty and ever-changing re­quire­ments, operating systems require con­tin­u­ous im­prove­ments or ex­ten­sions. You have different options for im­ple­ment­ing these im­prove­ments, which are hotfixes (quick fixes for a specific error), updates (a scheduled update), and service packs (a col­lec­tion of updates and hotfixes). These access the in­for­ma­tion in WinSxS to determine your system’s health. If the folder is missing the required ref­er­ences, the operating system updates will either not be installed at all or will be installed in­cor­rect­ly.

Fact

Updates and upgrades have different functions. An update improves the software and is usually limited to existing features. An upgrade replaces the software with a higher-quality version or a new version when it becomes available. Down­grad­ing involves reverting software back to an older or less complex version, which usually happens when newer versions have bugs.

Software mod­u­lar­i­ty

The modular design of software is the reason for the de­pen­den­cies between software and libraries or system functions. Some functions, such as opening files or querying the system time, are required by multiple programs. The operating system makes these functions available through pro­gram­ming in­ter­faces so that de­vel­op­ers can import them into their software. Many function libraries are located in the WinSxS folder. If you care­less­ly delete these files, various programs may no longer be able to run.

Summary

Lack of available hard drive space is still a frequent problem these days, es­pe­cial­ly if you have a laptop or computer with an operating system installed on an SSD. By cleaning up the WinSxS folder, you can get rid of un­nec­es­sary files. However, it’s important that you do not manually delete any content from the WinSxS folder. You should always use Windows tools to delete these files. If major updates have been installed recently, you should avoid deleting these files at all. If you do, you won’t be able to remove updates that may contain bugs.

Go to Main Menu