Winsxs what is this folder. Winsxs - what is this folder and how to clean it. The essence of the problem and features of its solution

While using the OS, users notice the rapid growth of the Windows folder. The increase in size is due to the fact that the internal winsxs folder begins to weigh a lot. Let's figure out what this winsxs folder is in Windows 7, 10, 8 and whether it can be deleted or cleaned.

Winsxs - what is this folder and can it be deleted?

This folder is located along the path C:\Windows\winsxs and stores OS component files, as well as backups and updates to these files. Even if these components are not installed on the operating system, they are stored in the winsxs folder, taking up HDD space.

Note: In these circumstances, the local drive letter is C. Your letter may be different, be careful.

In fact, the OS components are located in other places, and the contents of the winsxs folder are links to these components. When Windows updates are installed, they and their old copies end up in the winsxs folder. Over time, there are more and more updates and, accordingly, the winsxs folder takes up a lot of space in Windows.

The winsxs folder can reach several gigabytes in size. Although this free space does not mean anything for modern hard drives, it will not be superfluous. To find out how much winsxs weighs, just right-click on it, then select “properties”, and on the “general” tab look at the number of megabytes. This method will not provide information about the actual size of the folder, but will help judge the amount of free space. Remember this number, you will need it in the future for comparison.

Important! It is immediately necessary to make a reservation that deleting the winsxs folder in Windows manually in the traditional way does not make sense, since you can remove components vital for the operation of the system.

Cleaner programs are not suitable; standard OS tools remain that will help clean the winsxs folder in Windows. Let's look at the methods in more detail.

Removing old updates using the Disk Cleanup utility

This method works in Windows 7 and older, which will reduce the size of the winsxs folder. Run Disk Cleanup using one of the following methods:

In the new window, click the clean system files button (shown in the screenshot). If prompted by UAC, click yes.

To clean the winsxs folder in Windows, make sure that the checkbox next to the “Cleaning Windows updates” sub-item is checked, since this section is responsible for deleting files in the winsxs folder. Check other items as you wish. In this window you can also estimate the approximate amount of freed up disk space. Finally, click OK and wait for the process to complete; you may need to restart your PC.

Note: the update cleaning function is built into Windows 8, 10. For Windows 7, Microsoft released an update to add this option. If you do not find the update cleanup item, then download and install the KB2852386 update package. The methods below do not work on Windows 7.

Cleaning with Task Scheduler

With the release of Windows 8, a feature appeared that allows you to clean the winsxs folder automatically. An automatic StartComponentCleanup task has been created in the OS, which runs in the background to delete old versions of files after 30 days. This period is given to prevent incompatibility of new updates. You can manually run this task by following the steps below.

To start the task scheduler, in the “Run” window (opened with the Win + R buttons), write the command taskschd.msc, then click OK.

On the left side of the window, expand the “Task Scheduler Library” section, then the “Microsoft” and “Windows” subsections, find the Servicing section and click it. Select StartComponentCleanup and click “run” on the right side of the window to start cleaning the winsxs folder. You need to wait about an hour.

Note: you can implement this task via the command line. You must then use the command:
schtasks.exe /Run /TN "\Microsoft\Windows\Servicing\StartComponentCleanup"

Cleaning via the command line

Dism.exe is a cmd application that allows you to perform various manipulations with Windows components, which will help clean up the winsxs folder. In Windows 10, 8.1, a new AnalyzeComponentStore parameter was introduced, which helps determine how much space the winsxs package actually takes up. Open a command prompt with administrator rights, enter the following command and press Enter:

Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore

As a result of the calculations, you will know whether cleaning is recommended. To see the amount of memory that can be freed, pay attention to the items marked in the screenshot. The sum of these two elements shows the amount of occupied space on the hard drive.

After analysis, you can start cleaning the winsxs folder. The StartComponentCleanup parameter in cmd gives similar results as in the task scheduler. However, components are removed immediately, without waiting. In cmd with admin rights, enter the following structure, then click Enter:

Dism.exe /online /Cleanup-Image /StartComponentCleanup

Using the ResetBase parameter you remove all outdated versions of each component. The command looks like this:

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

The SPSuperseded parameter helps reduce the space that the service pack takes up. Use this command:

Dism.exe /online /Cleanup-Image /SPSuperseded

Wait for these commands to complete. Next, estimate the amount of freed memory using the AnalyzeComponentStore parameter.

Removing Windows components

Windows 8, 10 allow you to enable or disable Windows OS components. These functions are located in the “programs” section.

All Windows components are stored in the winsxs folder, regardless of whether they are enabled or not, and take up space. There is a way to help remove these components from winsxs entirely, thereby freeing up space. In the future, you will be able to download removed components as needed.

Run cmd with admin privileges. Type the command below, then press Enter:

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

The command line will build a table of component names, as well as their states. Remember the name of the component to be removed and use the following command:

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

In this command you need to replace NAME with the name of your component. In the example we will remove DirectPlay.

This will change the status to Disabled with Payload Removed. These are the ways you can clean up the winsxs folder in Windows.

That's all, now you know winsxs - what kind of folder Windows 7, 8, 10 is and how to clean it. It is recommended to use the first three methods first, although you don’t have to resort to the task scheduler method, since it is duplicated, but everything is at your discretion. Removing components is not recommended because it will not free up much space and the removed components may be needed in the future. You can also do this to free up additional space on the HDD.

The disk on which the operating system is located must have enough free space for it to function well. The trend is to abandon hard drives and install small-volume solid-state drives, specifically for the operating system. SSD drives cost a lot, and after installing Windows and a couple of programs on them, space may come to an end. In such a situation, the user may stumble upon the WinSxS folder, which is located in the Windows directory. Its size can vary from a couple to tens of gigabytes. The question arises, is it possible to remove WinSxS and all its contents from the computer, and how to do this? In this article we will try to figure this out and provide detailed instructions.

WinSxS: what is this folder and why is it needed

Before you delete one of the folders that is located in the Windows directory, you need to understand its purpose. The WinSxS folder is present in any version of the operating system above Windows 7. Its task is to store backup files of the operating system. Every time Windows is updated, backup recovery files are saved to the WinSxS folder.

If Windows is not reinstalled on the computer for several years, the WinSxS folder can seriously “grow” in size. Each operating system update adds several hundred megabytes of files to the folder. After just a couple of months of running Windows, the size of WinSxS begins to exceed a gigabyte, and after a year it can reach 5 gigabytes or more, depending on the operating system update frequency.

The answer to the question “Is it possible to remove WinSxS?” pretty simple. Files stored inside this folder should be deleted if the Windows operating system is stable after the update is installed. These files in Windows 10 may be needed not only to “roll back” to the version of Windows before the update, but also for .

Before you begin the process of deleting the contents of the WinSxS folder, you should be warned that you can only erase some data, and not the entire folder. That is why, to remove unnecessary information from WinSxS, you need to use special Windows tools, which differ depending on the versions of the operating system.

Important: Under no circumstances should you try to delete the entire WinSxS folder without first obtaining permission to change it from TrustedInstaller. If, when Windows boots, it does not detect the WinSxS folder on the computer, the operating system risks not working.

On the Windows 10 operating system, deleting files from the WinSxS folder should be done as carefully as possible, since, as noted above, some of them may be needed to reset the system to its original state. Based on this, you should determine which files can be deleted from WinSxS, and which ones are best left alone. In Windows 10, there is a special tool for these tasks that allows you to delete unnecessary backups from a folder, but not touch the system recovery files to their original state.

Cleaning WinSxS in Windows 10 is carried out as follows:


Note: on the Windows 10 operating system, it recommends cleaning WinSxS when the folder size approaches 10 gigabytes or exceeds this value. If a folder occupies 5 gigabytes or less, in some cases executing a command to clean it up may, on the contrary, lead to an increase in its size.

In terms of deleting files from the WinSxS folder, the Windows 8 operating system is the most user-friendly. It allows you to delete unnecessary recovery copies using the method described above for Windows 10, but it also provides a special program for cleaning the system disk.

To remove unnecessary files from the WinSxS folder in Windows 8 and Windows 8.1, you must:

This method of deleting unnecessary backup files from the WinSxS folder is the most convenient, and you can perform it with any amount of unnecessary information to restore Windows and not worry that important elements will be deleted.

How to clear WinSxS in Windows 7

The Windows 7 operating system out of the box does not provide the ability to delete unnecessary information from the WinSxS folder. At the same time, it allows you to install a special program on your computer, identical to the one used to clear temporary files in Windows 8 by default. The application is installed automatically, but the user needs to give the appropriate command for this.

There should be plenty of free space on the system drive C.

This will guarantee that your laptop (computer) system will work stably. SSD drives are faster than HDDs.

The only catch is that the price of an SSD drive is rather high. In this regard, after Windows is installed, there may not be enough space on the hard drive.

Therefore, the user often comes across the WinSxS folder, it is located in the Windows directory. The size of such a folder can reach several tens of gigabytes.

In this regard, most users ask the question “Is it possible to clear the entire WinSxS folder from a computer (laptop), and also how can this be done?”

You will receive information about winsxs and how to clean it.

What is the WinSxS folder?

There is a specific path to find this folder: C:\Windows\winsxs . This file contains backup copies of various updates.

If they were not installed in the OS, they are still stored in the winsxs folder and take up HDD space.

When Windows is updated, outdated copies also end up in the winsxs folder. After some time, their number increases, as a result of which the folder begins to weigh more.

The volume of such a folder can reach several gigabytes.

Of course, for the hard drives that we currently have, this amount of free space does not play a special role, but still it will not be superfluous.

In order to determine the weight of winsxs you need to do the following:

But! This method will not allow the user to find out the actual size of the folder, but it will be possible to find out how much free space is available.

Another important point in how to clean the winsxs folder is that you do not need to solve this problem using special programs that clean this folder.

The user will ultimately have only standard tools with which it is possible to empty the folder in Windows.

Important!!!

Windows takes up system disk space and how to empty the winsxs folder in windows. Pagefile.sys acts as the swap file. If the RAM is large, the size of this file can be adjusted (changed) manually.

On the menu "Disk Cleanup" there is a point "Cleaning in hibernation mode". If you do not use this mode, you can proceed to cleaning.

If the laptop is constantly in sleep mode, then after cleaning the file, enter in the command line:

Powerrofg –h on && shutdown.

A user's personal folder (for example, my documents or desktop) can be moved to another location either through the property of the desired folder or through group policies, such as how to clear the winsxs folder in Windows 7.

Why is the WinSxS folder constantly growing?

Many inexperienced users mistakenly believe that the WinSxS folder is a large disk space after the OS is installed.

It is necessary to take into account that there are files that are actually located in completely different places.

Their volume is taken into account only because Explorer has hard links.

Every user needs to know!

You should not enable show hidden files before you are planning to manually delete the entire contents of a folder.

After hidden files are deleted, your computer will be a little slow and may experience occasional crashes.

Below are several options for cleaning winsxs on different Windows operating systems. They will be discussed below in more detail so that readers receive comprehensive answers to their questions.

Cleaning in Vista

Any changes can be returned back to the position they were before.

If the user wants to roll back everything back to 6.0.6001 (including the initial build), you must install Vista Service Pack 2.

To ensure that updates cannot be returned, 2 system utilities are used:

  • Vsp1cln.exe– for cleaning up debris after installation;
  • Compcln.exe– to perform similar actions with SP

This system allows you to create restore points on demand during the installation of necessary and important updates or drivers.

This function can be installed either on demand or according to a schedule. This type of recovery consumes 15% of disk space.

You can disconnect such a disk using the function "Disk Cleanup". At the same time, on the tab "Additionally" keep the last restore point to save space.

Cleaning in Windows 7

Cleaning out the WinSxS folder is a complex process. You must follow the prompts of your PC. In addition to manually cleaning WinSxS, unnecessary files can be deleted "Task Scheduler" in Windows OS.

Click "Create task" in the Planner. After specifying the task name, click "Further".

Then select the frequency of running the task and follow the prompts. After all operations have been completed, reboot your computer.

Need to clean out the WinSxS folder in Windows 7? You must download and then install update KB2852386. You will see the required line in the utility.

For this operation you must press "Start" and enter "Update centre" to the search bar.

You need to choose "Search for updates", it will be in the left menu.

There you will need to select "Optional Updates" upon completion of the scan.

In the proposed list you will need to find KB2852386, then install it and then restart your computer (laptop).

After completing the above steps, be sure to type in the search engine "Disk Cleanup".

From the proposed options, mark "Backup Files" and press "OK".

Cleaning in Windows 8

There is one additional method for solving our problem - using the Disk Cleanup utility, its advantage is that it does not require decisions from users.

To empty the folder you should do some steps:

First you need to press the key combination Win+R and then enter "cleanmgr" . Then select drive C and click OK. As a result, the free space will be estimated, after which you have to select the option - "Cleaning system files".

Check the box "clean windows updates" and click OK. Then the process of cleaning Windows OS updates will start.

Another utility for cleaning Windows updates is the DISM utility..

The advantage of this utility is that with its help the user can also get rid of other garbage from the WinSxS folder.

First, open a command prompt as an administrator. This can be done using a keyboard shortcut Win+X.

Select Command Prompt.

Dism.exe /Online /Cleanup-Image /AnalyzecomponentStore

It will inform you how much free space you have on your HDD

If necessary, you can clear your backups and cache. Be sure to study the line "Cleaning up the component store is recommended" - "Yes".

Type the following command to remove unnecessary files:

After which the cleaning mode will become active.

Cleaning with a Scheduled Job

Windows cleans out the winsxs folder according to a specific and precise schedule. Do the following:

Microsoft→Windows→Servicing→StartComponentCleanup .

Because the cleanup is done by the COM object handler, you will not be shown a specific command.

If there are no triggers, this may indicate that the task is being performed automatically.

By running a task contained in schedulers, the user achieves the same result as from the DISM command with the /StartComponentCleanUp keys.

However there are some differences:

  • Those updates installed in the last month will be ignored;
  • Due to a pause that lasts for an hour, files may not be completely cleared.

After performing a cleanup in Windows 8.1, the user can once again analyze the storage to evaluate the existing changes.

Cleaning in Windows 10

Use a command prompt with administrative rights, it will help clean out the WinSxS folder. To start this process you need to type:

Dism.exe /Online /Cleanup-Image /StartComponentCleanup

At this stage, the function is completed and the folder is considered empty.

In order for you to be able to determine how much smaller the folder has become, you need to analyze the component store, to do this you need to do the following:

Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore

If you really need it, it is possible to reduce the file size further, because its parameter has an additional ResetBase key, which will help delete everything old and unnecessary.

To do this, enter:

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

Automatic removal

To ensure that the size does not increase without your knowledge, you need to set up a self-cleaning function for data and documents that you do not need.

To configure this function, you need to use the operating system's task scheduler.

You can find this program using the menu "Start". After launching the program, check the “Create a simple task” section, which is located on the right side of the window.

After which you must generate the StartComponentCleanUp task. To do this you need to go to the thread Microsoft→Windows→Servicing . After that, click OK and restart your computer (laptop).

Dism.exe

The Dism.exe maintenance system is a command line program that is also an assistant in setting up and removing Windows system components and drivers. The Clean up image option is most often used by experienced users

You need to set the StartComponentCleanUp parameter in the Dism.exe program. Please note that previous versions of such components will be quickly erased.

There will be no time limit here.

With administrative rights at the command prompt, enter

Dism.exe /online /Cleanup-Image /StartComponentCleanup

We hope that the above information in this article will help you clean up the winsxs folder of your computer yourself, free up free space on your hard drive and your PC will work properly.

Follow the above tips!

operating system WinSXS cleanup command
Windows Vista
Windows Server 2008 Service Pack 1
VSP1CLN.EXE
Windows Vista
Windows Server 2008 Service Pack 2
Compcln.exe
Windows 7
Windows Server 2008 R2 Service Pack 1
DISM /online /Cleanup-Image /SpSuperseded
Windows 8
Windows10
Dism.exe /Online /Cleanup-Image /StartComponentCleanup

Many owners of Windows Vista and 7 have probably encountered the fact that the Windows folder grows by leaps and bounds over time. I put up with this until the 40 GB partition with the system began periodically giving me messages that it was running out of free space.

I found one wonderful tool whose magic allows you to reduce the size of the winsxs folder without losing performance/stability/data. First, I did everything described under the cut on my home beech, and now, for the purity of the experiment, I will repeat it on my work one.

0. A little theory

In general, a lot has been said about how Windows uses system disk space, so I will be brief here.

pagefile.sys- swap file. You can disable it if the RAM size is large, or you can adjust the size manually.

hiberfil.sys- a file in which a snapshot of RAM is saved when the computer goes to sleep. In the “Disk Cleanup” menu, among other things, there is a “Clean up hibernation files” option. If you do not use this mode, you can clean it. If you regularly “fall asleep” your computer/laptop, then after clearing this file, you will have to use this advice, or simply enter in the command line powercfg -h on && shutdown -r .

Users' personal folders (My Documents, Desktop, Appdata, Main Menu, etc.) can be painlessly transferred to another location either through the properties of the desired folders or through regedit or group policies. This is a separate conversation, I will not consider it here.

It should be noted that any updates and upgrades in the Windows system are reversible, that is, by installing Vista Service Pack 2 (6.0.6002), you can roll back to 6.0.6001, and then to the original build. In order to make all updates installed on the system irreversible, you need to use two system utilities:
vsp1cln.exe- sweeps up debris after installing Vista SP1.
compcln.exe- does the same for SP2.

The system creates restore points on demand and automatically when installing drivers, important updates, on a schedule or on demand. Recovery uses up to 15% of the space on each drive it is on. You can disable it, or you can use “Disk Cleanup” on the “Advanced” tab to leave only the last restore point to save space.

About the folder winsxs the developers wrote that this is the main storage of the OS, and all other system files are like hardlinks, blah blah blah..., and yes, accept it as a gift from God that over time the size of the folder will only increase .

1. Preparation

Windows Vista Business 32-bit.
First I found out the size of the winsxs folder - about 4.5 gigs.
Next, all important and recommended updates as of October 8, 2009, including SP1 and SP2, were methodically installed. After completing all the procedures, I downloaded the wonderful Scanner to visually assess the scale of the disaster.

Installing updates transformed the Windows folder.

Now in order:
- vsp1cln.exe;
- compcln.exe - worked for about five minutes.

After that, I make a recovery checkpoint (you never know), get rid of the previous ones, and move on to the most important stage for today.

2.Winsxslite

It's not even a program - it's a .bat file that reduces the size of the winsxs folder. It was written by a certain Christian Bering Boegh and is distributed “as is”, which personally raised some suspicions in me, which could only be dispelled by a successfully executed script. Follow the link to find the latest version of the script (1.86) with comments from the author.

The script operation includes two phases:
1. Search in the Program Files and Windows folders for files identical to the files in winsxs.
2. Replacing old versions of a file in winsxs with hard links to newer versions of the file.

You can work with both the online system (that is, a running OS) and the OS image.
Working with the online system looks like this:
- Phase 1 scan;
- Phase 1 apply;
- Reboot;
- Phase 2 scan;

For the script to work, the configuration file config.txt is also used, which specifies exceptions for the first phase (logs, temp, cache, etc.), and language priorities for the second phase (unused localization files are replaced with hardlinks of the corresponding files of other languages), By default, “da-dk=KEEP” is written in the config, which changes to the required line ru-ru=KEEP, uk-ua=KEEP or another necessary one.

Winsxslite will only work if you have the following software:
- SubInACL v5.2.3790.1180;
- PendMoves v1.1 and MoveFile v1.0 ;
- - Command Line Hardlinks;
- Fcmp v1.6 - the author recommends using 1.6;
- MD5File ;
- StringConverter v1.2.

I put all the installed files in the winsxslite folder. If anyone is bored of doing all the procedures themselves, here is the link. There is actually winsxslite, all the necessary software plus a config with the corrected da-dk. The config can be deleted. When you launch winsxslite for the first time, a default config and help file will be created.

3. Results

Looking at the results, I realized that I had made a strategic mistake - I took a laptop for the test that was hardly used at work. That is, the OS was only a couple of days old, and virtually no one was working on the laptop. On a home computer, the results were more noticeable. There, the winsxs folder lost 8 gigs, but to the same 14.8.

Be that as it may, both patients were not harmed, and winsxslite turned out to be an excellent help in reducing the volume of insatiable Windows.

In conclusion, I would like to note that both phases of the script can take from one to two hours of computer work.

P.S. about disk space usage in Win7. No third-party programs (such as vLite) were used to castrate the system.

This directory usually irritates owners of PCs with the Windows operating system due to its volume and, moreover, only increasing over time. And most importantly, previously there was no sufficiently safe method to reduce the amount of disk space it occupied. Removing WinSxS caused Windows to malfunction or crash the OS.

Therefore, before taking any action, you need to carefully understand WinSxS: what kind of folder it is and whether it can be deleted.

Briefly about this folder

This directory contains OS backup files. Therefore, after each update procedure its size increases. It is located on C:\Windows\winsxs and is a system one. Thanks to it, you can uninstall updates and perform a system rollback if problems arise with Windows. This directory stores all data about the operating system, and if you delete it, the system will most likely no longer boot.

We've sorted out the issue of deletion, now let's move on to the problem of whether it is possible to safely empty the WinSxS folder in order to reduce its size and the amount of memory occupied on the computer's disk space.

Is it possible to clear the contents of WinSxS?

You can only delete certain files, and not everything in it. You will need to use Windows system utilities (the tools differ in different versions of the OS). Third-party cleaning applications do not have the ability to delete any information from this directory, since this directory is a system one.

Warning! If you manually remove the components contained in WinSxS, the consequences of the intervention are unpredictable.

The correct process for freeing disk memory

The Windows tool that you will need to use to properly delete some of the contents of the folder is called "DISM".

To launch this application follow these steps:


Doing this will not completely remove the WinSxS directory. Only outdated data will disappear, so you can assume that only a small amount of memory on your hard drive will be cleared. It depends on how long ago the OS was installed on the computer.

Process for Windows 10

The process of cleaning the WinSxS directory in Ten includes the following steps:


Important! The tenth OS provides for such a condition; only if the volume of the WinSxS directory is more than 10 GB, then it is advisable to clean it.

Process for Windows 8

Cleaning the WinSxS directory in Eight is especially easy. This can be done using a similar method indicated for the “Tenth” version of Windows, and this OS also has a special cleaning application.

The process of cleaning the WinSxS directory in Eight includes the following steps:

This method is the safest.

Process for Windows 7

In "Seven", the developers did not take care of the need to clean out the WinSxS directory, but you can install a special application on your PC, similar to the utility used in "Eight".

To install the application you must do the following:

By analogy with the algorithm of actions in Windows 8, you can clean the WinSxS folder.