What to delete in the winsxs folder. How to empty the WinSxS folder and is it possible to delete it? Is it possible to clear the contents of WinSxS

The WinSxS folder is located on drive C in the Windows directory and is used for reserve storing previously installed versions of system components. Its volume can be enormous, often several gigabytes. Some users may be annoyed by this fact, and some (on computers with small hard drive) – you just need to somehow save space, including by reducing the size of this folder. Fortunately, now, due to the significant volume of modern disks (several terabytes), this problem is almost no longer relevant and many may not even think about how to reduce this folder.

Why is it so big and constantly growing?

We immediately warn you that it is extremely Not recommended delete something from this folder manually using the standard method. Some even ask whether it is possible to completely delete this folder? The clear answer is no, under no circumstances. This will almost certainly lead to more than just system errors, but can also cause irreparable harm to the system up to until it is impossible to start it further.

However, it is quite possible to reduce its volume in reasonable ways without damaging the OS. Tips regarding cleaning methods will be described below for various operating systems: Windows 7, 8, 10. But you shouldn’t expect any special miracles, the volume of this folder usually cannot be reduced significantly, most often such cleaning will be limited to a few hundred megabytes, but in some cases it is possible and save a couple of gigabytes.

During Windows updates, outdated versions files and change information are saved in this folder. This is necessary if you decide to roll back in case of problems - therefore, the WinSxS content improves reliability and tolerance to system failures. The folder size depends on what frequency Components are updated as often as possible. That is, if you installed your operating system relatively long ago, then the directory will probably weigh significantly.

How to empty a folder in Windows 10

Ten, in addition to what was previously described, uses this directory to ensure that Windows is reset in case of unforeseen circumstances to the original state.

By applying the steps described below when updating the OS, you will be able to get rid of unnecessary files.

First let's load the console cmd on behalf of the administrator. The string to be entered will, for our purposes, be next:

Dism.exe /online /cleanup-image /AnalyzeComponentStore

The WinSxS directory will be analyzed and you will see whether it needs to be cleaned.

If it is written Yes, then enter the following command as in the next window.

Our storage will automatically begin cleaning out obsolete files, after which we will see a message indicating the successful completion of the operation.

Cleaning should not be done very often; it only makes sense if the folder exceeds 7 GB in volume, less is normal.

Cleaning a folder in Windows 7

You need to tinker with this version of the system, as you need install additional update KB2852386, and then the required field will be added to the disk cleanup utility.

First let's launch Update centre by entering the word "center" in the search or using Control Panel.

In the Download and install updates field, click Install. We look for what we need, install it, then reboot.

Loading Disk Cleanup by entering the word “cleaning” in the search.

In the utility we are interested in cleaning system files, namely the “ Cleaning Windows Updates» or backup files.

Clearing a folder in Windows 8

In the eight (8.1 also) in the disk cleanup utility, the option to clean up system files is available by default, which is good news - you don’t need to make unnecessary moves to install optional additional updates.

We launch it in the same way by entering the name of our utility in the search.

Similar to seven clear system files, or clean updates in downloaded files.

In eight with one, just like in ten, you can clear this directory in cmd console(on behalf of the admin, of course). The team we are interested in:

DISM (image serving system) is like this utility, which will help you install, configure, and update files and components in Windows.

Auto-clean backups

The smartest thing to do is to set up automatic cleaning of these backup components, so as not to think about whether or not to start optimizing the contents of WinSxS or to prevent the mistaken deletion of necessary files.

Tune this function possible in Planner. To open it in search let's type in the word " scheduler».

In the console we follow the path Library\Microsoft\Windows\Servicing

Find a task StartComponentCleanup click on the menu Execute. The task of cleaning and compressing components will start. You can also configure the optimal frequency of performing this task.

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

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

The only catch is that the price SSD drive not little. 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 . 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 certain way 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 hard drives That amount of free space that exists now 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.

One more important point How to clean out winsxs folder is something that doesn't need to be addressed this task using special ones that clean this folder.

The user will ultimately only have standard means, with which you can clean up a 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. In case if RAM has large dimensions - size this file can be configured (changed) manually.

On the menu "Disk Cleanup" there is a point "Cleaning in hibernation mode". In case if this mode is not used by you, 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 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!

Do not enable display mode hidden files, before you decide to manually delete the entire contents of the folder.

After the hidden ones are removed, 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 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. Except manual WinSxS cleaning 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" into 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 the computer ().

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 to solve our problem, use 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 command line on behalf of the administrator. This can be done using a keyboard shortcut Win+X.

Select "Command line".

Dism.exe /Online /Cleanup-Image /AnalyzecomponentStore

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

If necessary, you can clean the backups and . Be sure to study the line "Cleaning 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 task scheduler operating system.

You can find this program using the menu "Start". After starting the program, check the section "Create a simple task", 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 (laptop).

Dism.exe

The Dism.exe maintenance system means that the system is a command line program, which is also an assistant in setting up and uninstalling components of the Windows and . 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 on your computer yourself, clean free place on and yours will work properly.

Follow the above tips!

operating systemWinSXS 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

Folder WinSxS (Windows Side By Side)- This is a component store and is found in Windows 10, Windows 7, Windows 8 systems and can reach sizes of up to 20 GB. It is located along the way C:\Windows\Winsxs and has a "system" level. This means that you do not have to manually delete anything, compress or move the data in this folder to make it smaller. I also don't recommend using third party programs to clean this folder. In the WinSxS folder, many files use a technique called Hard Linking. This "hard link" feature allows multiple files to access the same location without creating a copy of that location or data. And this is the main reason why you should not delete anything if you do not want to disrupt the operation of the system and the launch of programs.

The WinSxS folder stores multiple copies of "dll", "exe" and other files, allowing applications to run on Windows without compatibility issues. Update files and Windows installations, including backup files so that whenever the original files fail, you can easily restore Windows system 10/8.1/7. For example, when Windows 10 is updated, a new version of the updated component is installed on the system, and the old one is stored in the WinSxS folder. This is necessary to ensure application compatibility and rollback capabilities. Over time, the WinSxS folder is constantly growing and this leads to a lack of space on the system local disk.

How to properly clean out the WinSxS folder in Windows 10/7/8.1

1 way. This method is suitable for Windows 10 And Windows 8.1. Open a command prompt as an administrator and enter the following command, which will analyze the WinSxS folder and give a cleaning recommendation, in my case it says “Yes”.

  • Dism.exe /online /Cleanup-Image /AnalyzeComponentStore

Enter the following command to start cleaning.

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

If it seems to you that the WinSxS folder still weighs a lot after cleaning, then enter another command. It will help you remove all superseded versions of each component in the component store.

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

We can now reduce the amount of space used by the update package. To do this, enter the command below. I didn't have any old updates, you may have the same.

  • Dism.exe /online /Cleanup-Image /SPSuperseded

2 way. This method is suitable for Windows 7 and all other versions. The bottom line is a standard disk cleanup that will help you reduce the size of the WinSxS folder. Click right click mouse on the local drive C:\, where the Window 7 system itself is installed and select " properties". Next click " Disk Cleanup", select all the checkboxes and click on the button below Clean system files". You will have a new window where you essentially need to remove old Windows updates, but I recommend selecting all the checkboxes and clicking "OK"

When you see the WinSxS directory, what kind of folder is it anyway, and why does it weigh so much? You cannot erase all content. At least, in the usual way. If you delete important system files, problems will occur in the OS. But the directory size increases over time. And it will be useful to figure out how to clean it and whether it can be done at all.

WinSxS is located in the root directory of the OS (usually C:\Windows) in all modern Win, starting from version 7. The files and directories that are located there are needed for the operating system to work. If they are removed, changed, moved or renamed, serious problems can arise. At best there will be errors. At worst, Windows will no longer start. And you will have to restore it. Therefore, before you clean out any system directory, make sure that it will not damage the OS or cause critical failures. And to understand whether it is possible to remove WinSxS, you need to understand why it is needed.

It stores files that are needed for Windows recovery. After each update, a backup copy is created - a certain image of the system. With it, you can return Win to the state it was before the update. This is useful and required function- after all, new versions of programs and services do not always work stably.

If you installed the OS recently, then WinSxS will be “small” - only a few gigabytes. But over time, the directory grows or takes up more and more disk space. Its size sometimes reaches 10-30 GB. Moreover, some of the content may no longer be needed. Why would you go back to a security update you downloaded a year ago?

But you can't just clear the entire folder. Or delete some “old” files by looking at their creation date. If you act carelessly or thoughtlessly, the system will cease to function. You can reduce the size of this directory using some built-in OS tools. Or just reinstall Win.

The memory that is listed in the WinSxS properties is slightly different from the “real” weight of the folder. In fact, it is slightly smaller, since some of the content is hard links (symbolic). The conductor “does not notice” them.

If several days have passed after the update and the OS is working normally, then a backup copy is no longer needed. But it is recommended to erase only “old” files. After all, they definitely won’t be needed. It is not possible to completely clear the Windows 7 WinSxS folder. Only certain files can be deleted. To do this, SP1 must be installed.

The freed up space can be distributed more usefully: download applications, download videos, save personal data, and so on. Or leave some memory for system needs.

How do I know if SP1 is installed?

It was in Windows 7 SP1 that access to Win SxS appeared. In previous versions of Win, cleaning this folder was not possible. To see if this package is in the OS:

  1. Go to the “Control Panel” (for example, through the “Start” menu).
  2. Open the System option under the System and Security category.
  3. The “Edition” field should contain information: OS version, Microsoft copyright, year of creation. If there is a line “Service Pack 1”, then everything is in order and the directory can be edited.

Before cleaning

Before clearing WinSxS, you need to download one update (if it is not already installed).

  • Go to Start - Programs - Update Center.

  • Click on "Optional Updates". If such an item is not there, it means that all services are already loaded.
  • In the list, find the update with the number “KB2852386”.
  • Check the box and confirm installation.

Without this update, WinSxS cleaning will not be available. It can also be downloaded from the official Microsoft website.

  1. Go to com.
  2. In the search bar at the top right, enter “KB2852386.”
  3. Select the update that is suitable for your system: 32-bit or 64-bit.
  4. To do this, right-click on the “My Computer” icon, then on “Properties”. The “Type” line will indicate the Windows bit depth.

Cleaning

If you are wondering how to remove WinSxS, give up this idea. This folder cannot be completely erased. It is also not recommended to manually remove files from there. There will be unpleasant consequences. But clearing some of the contents and slightly reducing the size of the directory is a very real task.

Disk Cleanup Function

  • Right click on system disk. A context menu will open.
  • Select the "Properties" line.
  • General tab.
  • "Disk Cleanup".

Click on Disk Cleanup

  • Check "Windows Updates". If it is not there, click on the " System files" The required line should appear.
  • Confirm the action by clicking on “OK” and then on “Delete”.
  • Wait for the process to complete. Next, you may need to restart your PC.
  • The service only gets rid of unnecessary updates. It is not possible to erase the entire folder.

Command line in Windows 10

WinSxS in Windows 10 can be cleared if you use the console.

  1. Right-click on the Start menu. It looks like the Win logo.
  2. Select "Command Prompt" and run it as an administrator.
  3. Enter the command “Dism.exe /online /cleanup-image /AnalyzeComponentStore”.
  4. The system will analyze and make recommendations.
  5. If it prompts you to delete unnecessary files, use the command “Dism.exe /online /cleanup-image /StartComponentCleanup”. The cleaning will begin.
  6. If the directory weighs less than 5 GB, it is better not to touch it. Otherwise, the opposite effect will result - an increase in volume instead of optimization.

If the WinSxS folder takes up too much space, you can clean it up. This is done through special OS services or the command line. You should not change the contents of the directory directly. If you delete all files using the “Delete - Enter” method, serious problems will arise.

In this article we will discuss the situation around the WinSxS folder in Windows, why it invariably grows in size, and ways to regulate its volume.

Directory C:\Windows\WinSxS is a repository of Windows OS components. It contains DLL files, binary files, XML files necessary for installation and operations of any Windows features. When Windows updates are installed, new versions of Windows components appear on the system; in this case, previous versions are moved to the specified folder. This is done so that the user has the opportunity to roll back if any problems arise with the update or maintains the possibility of compatibility with previous versions.

Even without looking closely at this brief description of the purpose of the folder, you can understand that over time, an increase in the volume of the folder is inevitable. Moreover, this process is unlimited, although in its memory there are WinSxS folders larger than 20 GB I did not see.

The easiest way to reduce the folder size is to simply remove previous versions of the remaining components and outdated updates (not manually, of course). To do this, you can use the system cleanup utility built into Windows 10 or a special option of the DISM command (more on that below).

BY THE WAY

In Windows 7, the cleaning tool of the same name does not affect old updates. Default. To remove unnecessary updates in this version using cleanmgr.exe KB update 2852386 is required.

Everything would be fine, but not everything is so simple. In addition to the described functions, the WinSxS folder is a real warehouse of hard files, which are pointers to files, taking on all their functions. This means that the link and the file itself can have different names and be located in different directories of the same volume, while pointing to the same object. A file managers of all stripes display big size WinSxS folders, taking into account such hard links that lie in this directory. The actual size of the WinSxS folder can be found out, for example, using a small program D.U.(Disk Usage) from Sysinternals. You can also check the size of the system component store using the DISM command:

Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore

Often on forums the question of manually clearing a folder is repeated. I will support those who are smart enough to protect users from erasing WinSxS content by simply highlighting and pressing Delete. Often such actions end in damage to the system image, although sometimes (even rarely) such deletion “works.” But even if this happened, this method of freeing up space is highly not recommended. The main ways to clean WinSxS are:

  • compressing a folder using NTFS compression
  • deleting old versions of components from their storage (remaining versions after installing updates)
  • removing unnecessary system components.

By applying all three options at once in the order described below, you can achieve good results in freeing up disk space. And, if you are the owner of Windows 10, start with the command in:

Dism.exe /Online /Cleanup-Image /StartComponentCleanup

Copes with this and cleanmgr.exe, also run as administrator. By the way, in the Planner Windows tasks 10 provides an operation similar to DISM. It overwrites outdated updates older than 30 days. Look for a task with the name StartComponentCleanup In chapter ~\Microsoft\Windows\Servicing.

On-demand settings or removal of components

This “function” appeared in new version Windows, allowing you to delete binaries of unused system features. And it is only accessible from DISM or using the DISM cmdlet in PowerShell. Also, be aware that the DISM command is not capable of parsing dependency packages like it did in previous version with a similar possibility. In general, after removing a package using only DISM, only what is specified will be removed. And the remaining dependent packages will remain. Full list settings and functions in Windows image You can see it by running the command in the console:

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



For example, we are not going to use the one that always appears in all Windows versions almost useless for a long time Internet Explorer . It can be removed from the list of functions and capabilities, i.e. from exactly the WinSxS folder, using this command:

DISM.exe /Online /Disable-Feature /Featurename:Internet-Explorer-Optional-amd64 /Remove

Now in the list of available system functions the status of this service will change to Disabled. However, this is precisely the case when the user must be confident in his actions. You should not rashly disable all Enabled functions for obvious reasons.

NTFS compression for WinSxS

The next option to reduce the size of the WinSxS folder is to apply to the . In this case, it is strongly recommended to ensure that you create a full backup copy of the system. After its creation, launch the console and stop a couple of services:

Sc stop msiserver sc stop TrustedInstaller sc config msiserver start= disabled sc config TrustedInstaller start= disabled

Let's stock up on a backup copy of access lists assigned to folders and files (ACLs) in our directory using the utility icacls. Backup copy An ACL is a simple test file that specifies files and folders, as well as permissions to them.

Icacls "%WINDIR%\WinSxS" /save "%WINDIR%\WinSxS_NTFS.acl" /t

Let's become the owner of the WinSxS folder itself and the folders included in it:

Takeown /f "%WINDIR%\WinSxS" /r

Let's assign full rights to this directory to our account:

Icacls "%WINDIR%\WinSxS" /grant "%USERDOMAIN%\%USERNAME%":(F) /t

Let's compress the contents of the folder with a command from the terminal. Some of the files will not be compressed (they may simply be in use by the system right now), so if you run the command without the /I flag, it will stop the process if it encounters a locked file. You can find the name of the process that is working on this file ( Ctrl + F) and stop it. However, it is worth focusing specifically on compressing those files that are not used by the system:

Compact /s:"%WINDIR%\WinSxS" /c /a /i *

After we finish, it is better to delegate the additional rights to WinSxS back to TrustedInstaller:

Icacls "%WINDIR%\WinSxS" /setowner "NT SERVICE\TrustedInstaller" /t

We restore the original ACLs to the WinSxS folder from the previously created backup file:

Icacls "%WINDIR%" /restore "%WINDIR%\WinSxS_NTFS.acl"

Now let’s restore the autostart of services Windows Installer and Windows Module Installer:

Sc config msserver start= demand sc config TrustedInstaller start= demand

You can check the size of the WinSxS folder:

In my case, using compression, I was able to reduce the folder size by almost 4 GB. God knows what, however... On one of my machines I have a small SSD - for it even this amount of space is serious. And, if you like this scenario, I can suggest replacing the commands in this paragraph with this batch file:

Close before starting Windows Explorer. Before starting, unzip the file from the archive, unlock it in properties and run as administrator. It will take a lot of time.

How will compression affect the operation of the WinSxS folder and the system as a whole?

Windows works with compressed files in the so-called transparent mode (data transfer mode). But data compression/decompression always takes time. And this is what the user sometimes notices: not all of us have a “modern stone” attached under the hood. But, by the way, in the case of the compression function, have powerful processor much more efficient than fast HDD– in some cases, I personally even noted an increase in speed when working with compressed files. So users of older computer models will not experience any slowdown, but owners of “older” computers should use the compression function carefully in relation to any compressed files and folders.

Removing old versions: cleanmgr.exe

Another reliable way free up disk space (including in the WinSxS folder) is a cleaning utility cleanmgr.exe. In Windows 10 it can do a little more than the previous ones in Vista/7. Let's launch:

cleaning winsxs folder windows 7