+5 votes
226 views
in Setting by (242k points)
reopened
WinSxS: the folder for system files

1 Answer

+3 votes
by (1.6m points)
edited
 
Best answer

Key facts about the WinSxS folder
Purpose of the WinSxS folder
Manage WinSxS folder
Alternatives to save space
Why can't I just clean the WinSxS folder?
In summary:
Windows 8, 8.1, 10, Server 2012
WinSxS on Windows 7
Windows disk drives
Updates, Service Packs, and Hotfixes
Modular structure of the programs

image

WinSxS: the folder for system files

When we finish buying or reinstalling a computer, its storage space seems infinite. It is even possible that, as users, we wonder if we really need a disk space of 500 gigabytes or 1 terabyte. After a few months of use and after installing different applications that take up a lot of space, things change, and disk space is reduced little by little without knowing very well why at first glance. The reason: the Windows operating system requires a considerable amount of space to update and maintain its system data ..

Updates are usually downloaded and installed in the background. If an update fails, the normal thing is that the previous version of the application can be opened. This version is located in a folder on your system called the WinSxS folder. This folder also has other functions. Over time, the folder takes up a considerable volume. And it is at that moment that the question arises under what circumstances and how the WinSxS folder can be cleaned. In any case, you should never delete files from the WinSxS folder manually . This could have a very negative impact on the functionality of the system.

Index
  1. Key facts about the WinSxS folder
  2. Purpose of the WinSxS folder
  3. Manage WinSxS folder
    1. Windows 8, 8.1, 10, Server 2012
    2. WinSxS on Windows 7
  4. Alternatives to save space
  5. Why can't I just clean the WinSxS folder?
    1. Windows disk drives
    2. Updates, Service Packs, and Hotfixes
    3. Modular structure of the programs
  6. In summary:

Key facts about the WinSxS folder

The folder belongs to the standard folders for Windows installations. For that reason, it is located on the system partition. WinSxS is short for? Windows-Side-by-Side ?. Literally translated, side-by-side means side by side . This gives an idea of ​​the purpose of this folder: in it, the versions of the files are additionally stored . The name in Spanish of the WinSxS folder is? Component store ?. It predominantly contains system files and can reach a volume of several gigabytes..

Purpose of the WinSxS folder

In the WinSxS folder, the files necessary for system restore are available . In particular, it supports the following applications:

  • Parallel save different versions of dynamic link libraries (DLLs) and other system files: Old applications may not be compatible with modifications to DLLs. For this reason, different versions are saved at the same time in WinSxS.
  • Enable and disable features during operation - Some Windows features, such as the Hyper-V virtualization application and the sandbox linked to it, can be enabled without having to be installed. The files required for this are also located in this folder.
  • Adding roles in server operating systems - Windows server operating system roles are also called roles. In this way, the server can, for example, take the role of a DHCP server on the network. For this type of extensions the WinSxS folder is also used.
  • Reset the system in case of boot problems: If the operating system does not start, it can be booted into a reset mode. In this way, old versions of system programs can be accessed.
  • Uninstall problematic updates : When Windows runs an update, it does not delete the previous version, but saves it so that you can access it in case of difficulties.

Manage WinSxS folder

Microsoft operating systems offer several possibilities to clean the WinSxS folder without the need to resort to external programs. There are hardly any differences between the usual versions of Windows 8, 8.1, 10 and the server variants. In either version, keep in mind that the size of the system folder shown in the explorer does not always really correspond to the actual storage space. The reason is links to existing files.

Done

By links (also called links or links ) we understand the entries that refer to other files. A distinction is made between permanent links ( hardlinks ) and symbolic links ( softlinks or symbolic links ). The content of a file is stored separately from the metadata (name, storage path) in a file system. When creating hardlinks , a new name is entered that refers to an existing file in disk space. The entry must not be differentiated from the original file entry. In contrast, in the case of softlinks , only a reference to the original file entry is created. On Windows, softlinks have the extension .lnk ..

It is important that the versions of the programs that are no longer in use are only removed from the WinSxS folder if the system has been stable for a long period of time . After removing these versions, changes to a previous version or removal of the update will no longer be possible.

Windows 8, 8.1, 10, Server 2012

To organize the WinSxS folder, Windows has Disk Cleanup available . This liberator also serves to clean other Windows folders. It can be opened from the search field or from the Windows command window with the cleanmgr.exe command . First, you will be asked which disk drive you want to clean. Then a selection field will be displayed with the items that can be removed. For example:

  • Downloaded program files
  • Temporary internet files
  • Distribution optimization files
  • Temporary files

Also, you can see the total space that will be reclaimed. After selecting the desired categories, it is confirmed with the button? OK? and cleaning will start after a confirmation request.

You will find additional options in the section? Clean system files ?, although you will need administrator rights to access. The program will also start asking which drive to clean. The following additional selection fields will then be available:

  • Windows update cleanup
  • Windows Defender Antivirus
  • Windows update log files
  • Device Driver Packages

A practical alternative to cleaning the WinSxS folder is the command line program dism.exe . To do this, the console must be started with the command prompt ( cmd.exe ) with administrator rights. The Dism.exe / Online / Cleanup-Image / AnalyzeComponentStore command analyzes the WinSxS folder to determine the space actually used. Additionally, running the command provides useful information, such as the date of the last cleanup, and breaks down for which components memory is being used. The tool also offers the WinSXS cleanup function: Dism.exe / Online / Cleanup-Image / StartComponentCleanup

Other useful program options are:

  • Dism.exe / Online / Cleanup-Image / ScanHealth to inspect the WinSxS folder
  • Dism.exe / Online / Cleanup-Image / RestoreHealth to fix certain errors. As with all folders, there is also the possibility to reduce the size of the WinSxS folder through compression . First of all, you must open the properties in the context menu and select the option? Advanced options ?. In the new selection field, you must check the box? Compress content to save disk space ?.

WinSxS on Windows 7

In principle, it is not recommended to continue using computers with Windows 7 as the operating system. As of January 14, 2020, there are no longer any security updates for this version of the operating system. All in all, just in case you continue to use Windows 7, for example, as a standalone system for a certain application, we will briefly discuss here how to manage the WinSxS folder with this operating system.

The cleanup was already available in this version and visually it does not differ much from the other versions of Windows. Therefore, it can be used as described before. The dism.exe tool was introduced with version Windows 7. However, it does not have the same range of functions. Thus, the options to scan the folder and to troubleshoot are missing.

Alternatives to save space

If reducing the size of the WinSxS folder is not enough, there are other alternatives to get more space:

  • Disable system hibernation - For system hibernation, an image file with the name hiberfil.sys is generated which can be quite large.
  • Store the user profiles in another disk drive : if a reinstallation must be avoided, the storage location of the user profile subfolders can be changed in the properties section of the "Location" tab. It is also possible to use another disk drive, for example a new hard disk.
  • Store program folders on other drives - In most cases, programs that take up particularly large amounts of space can be installed on other drives.
  • Uninstall unnecessary programs and functions via the menu item? Programs and Features? control panel
  • Delete unnecessary folders, such as Windows.old
  • Disable restore points

Sometimes freeing up space in Windows folders is not enough. In those cases, the best alternative is to reinstall or reset the system . For this, there are also different alternatives that leave the installed programs or the files themselves intact. In this sense, there are slight differences between the Windows 7, Windows 8 and Windows 10 versions.

Why can't I just clean the WinSxS folder?

Windows saves important system information in WinSxS. If this information is deleted or moved, some processes may stop working properly. But why is it?

Windows disk drives

Windows is usually installed on the first partition of the hard drive. Partitions are also called disk drives or volumes. Together they make up the same memory device. The first partition on a hard drive is usually given the drive letter? C ?. The path C: \ Windows \ contains most of the files and folders that are important to the operating system, including WinSxS.

These files cannot be moved to another drive without further ado, since the operating system components would not find them if they were. Therefore, it is important to allocate enough disk space for the system partition during installation-

Done

The storage space of a hard disk must be managed in structures compatible with the operating system. To do this, one or more partitions are created . The storage space is divided logically. Each partition is formatted with a file system, which manages the folder structure and files, including metadata. The hard disk makes a partition table in which all partitions are included.

Updates, Service Packs, and Hotfixes

Operating systems and other applications have long since been inflexible structures that are installed at one point in time and used for years. Due to their complexity and the continuous change in their demands, they need improvements at all times or extensions. There are several possibilities to do this: Hotfixes (a quick fix to a problem), Updates (a planned update), and Service Packs (a set of updates and hotfixes ) access WinSxS information to find out the status of the system. If the necessary references are not available there, the operating system updates are installed incorrectly or not installed at all.

Done

The difference between the update and upgrade concepts lies in the functional content of the update. An update usually improves a program within the framework of the functions it already has. The upgrade involves improving the program to a higher quality version available or a version that was just released. On the other hand, the downgrade implies the change to an older version of the program or a program with fewer functions and is done when the new versions contain errors.

Modular structure of the programs

One reason for the dependency between programs and libraries or system functions is the modular structure of the programs . Some functions, such as opening files or checking the system time, are required by various programs. The operating system gives access to these functions through programming interfaces so that developers can import them into their programs. Many of the function libraries are located in the WinSxS folder. If this data is removed recklessly, some programs may no longer be able to function.

In summary:

Especially when we talk about laptops or computers whose operating systems are installed on an SSD, it is more and more frequent that there are problems with available memory. By cleaning the WinSxS folder , we can get rid of the ballast of files that we no longer need. However, it is important to do so without manually removing any necessary content. It is imperative that removal is carried out with Windows tools. If you just installed a big update, you should avoid removing it at all costs. Otherwise, possible faulty updates can no longer be uninstalled.


...