You need to write the file to the windows winsxs folder. What is the WinSxS folder and how do I clear it? However, there are some differences

The WinSXS folder is an integral part of any operating system version 7 and higher. It is an archive that stores information for system backup recovery. The folder is replenished with files with each Windows update and can grow to quite large sizes if the OS is not reinstalled for a long time.

In theory, the WinSXS folder can be cleaned up periodically. However, deleting some files can have a negative effect on the performance of your computer. To find out what exactly can be removed, and what is better to leave, it is necessary to resort to using special software.

How to clean the Winsxs folder in Windows 7

To be able to perform actions with the WinSXS folder in Windows 7, the SP1 update package must be installed on your PC. You can check its presence on the following path: "Control Panel" - "All elements of the security system" - "System". Just below the OS version, the line Service Pack 1 should be indicated. If it is not there, then you will not be able to delete the folder.

Before proceeding directly to deleting the folder, you must download the update KB2852386. Enter the Update Center through the Start menu. Find the number you are looking for in the list of "Optional updates" and install it.

There are several ways to clean the WinSXS folder in Windows 7. The first of them involves cleaning the disk through the "Properties".

Go to the "My Computer" folder and right-click on the "Local drive C" icon and select "Properties". Next to the pie chart showing disk fullness is the Disk Cleanup button, which must be pressed. Extra files will be deleted automatically.

You can delete unnecessary documents using the "Run" command. In the line "Open:" enter in Latin cleanmgr and press Enter. Select "Drive C" and then check the box next to "Clean up Windows updates". The command will be executed.

You can use a special utility to clean up the storage WinsxsLite... It is freely available on the Internet.

Download the program and open it with administrator rights. Enter "1" then "s". The scanning process will start. It usually lasts a long time. After its completion, enter the following data:

  1. Phase 1 + Apply [a];
  2. Phase 2 + Scan [s] + Apply [a];
  3. here write the same as in the second line.

Clear Winsxs in Windows 8

Actions with the WinSXS folder in the "eight" can be performed using the "Disk Cleanup" function. Call the Run command and enter cleanmgr... Next, select the C drive. In the new window, you need to click "Clean up system files". Check the box next to "Clean up updates" and wait until the process is complete. This method will delete the update files from the folder.

To get rid of minor files, we recommend using the DISM utility. Open command prompt as administrator. Set the command: Dism.exe / online / cleanup-image / AnalyzeComponentStore.The search will begin for files that can be “painlessly” deleted from the folder. At the end of the process, you will see the OS recommendations for cleaning up the storage. Automatic removal of unnecessary components can be started by entering the command Dism.exe / online / cleanup-image / StartComponentCleanup.

How to empty the Winsxs folder in Windows 10

Deleting data from the WinSXS folder in the tenth version of Windows should be extremely careful. It is not recommended to take any action if the folder size is much less than 10 GB. The peculiarity lies in the fact that when you delete items from a folder “lighter” than 5 GB, its volume may increase and the system will work worse.

Cleaning in Windows 10 usually happens through the command line. The algorithm of actions absolutely corresponds to that described for version 8 of the OS.

The Windows operating system, which, although constantly updated, has a number of shortcomings, sometimes that an inexperienced user cannot fix. For example, Windows has a bad property of "clogging up" with various "garbage" that is not displayed in any way by utilities such as CCleaner, Vit Registry Fix and the like. As a result, the system disk may be overloaded, and there will be little space on it.

Today we will talk about cleaning the WinSxS system folder, make a reservation about its purpose and teach you how to automate the process of deleting unnecessary files.

What is the WinSxS folder for?

The WinSxS folder contains backup copies of system files that have been changed in one way or another after updates. The copies themselves are used to be able to roll back the state of the system to the moment when everything was fine, if necessary, while the current files (not backups) will be deleted.

The WinSxS folder can grow huge over time, up to several gigabytes, which can interfere with a computer that has little physical memory.

How do I clear the WinSxS folder?

To open the option to clear the WinSxS system folder, you will need the KB2852386 update installed, which adds the ability to clear this partition.


At the command prompt, run the command cleanmgr .


Wait while the system checks the disk for files that can be cleaned up.

In the proposed list, check the box next to Cleaning Windows updates.

Click OK and wait until the end of the cleaning process, then check the result.

Cleaning process automation

In Windows 7, cleaning up the WinSxS folder can be automated. To do this, enter the command line and paste the following code there:
:: configuring winsxs folder cleaning
REG ADD "HKEY_LOCAL_MACHINE \\ SOFTWARE \\ Microsoft \\ Windows \\ CurrentVersion \\ Explorer \\ VolumeCaches \\ Update Cleanup" / v StateFlags0088 / t REG_DWORD / d 2 / f
:: (optional) setting for cleaning temporary files (in particular, it cleans up the dism temporary folder)
REG ADD "HKEY_LOCAL_MACHINE \\ SOFTWARE \\ Microsoft \\ Windows \\ CurrentVersion \\ Explorer \\ VolumeCaches \\ Temporary Files" / v StateFlags0088 / t REG_DWORD / d 2 / f
:: creating the "CleanupWinSxS" scheduled task
schtasks / Create / TN CleanupWinSxS / RL Highest / SC monthly / TR "cleanmgr / sagerun: 88"

After the introduction of this program code, the WinSxS folder will be cleared every 1st day, without disrupting the operation of the operating system and without loading the computer with unnecessary actions.

We hope we helped you understand the process of cleaning up the WinSxS folder.

One of the most massive folders in Windows 7 and takes up significant disk space FROM, is the system directory "WinSxS"... In addition, it has a tendency to constantly grow. Therefore, many users are tempted to clean this directory in order to free up space on the hard drive. Let's see what data is stored in "WinSxS" and whether it is possible to clean this folder without negative consequences for the system.

"WinSxS" - this is the system directory, the contents of which in Windows 7 are located in the following path:

C: \\ Windows \\ WinSxS

The named directory contains versions of all updates for various Windows components, and these updates are constantly accumulating, which leads to a regular increase in its size. For various system crashes using content "WinSxS" rollbacks are made to a stable state of the OS. Therefore, it is categorically impossible to delete or completely clear this directory, since at the slightest failure you risk eventually getting a dead system. But you can clean some components in the specified directory, although Microsoft recommends doing this only as a last resort if you are critically short of disk space. Therefore, we advise you to make a backup copy of the OS and save it on a separate medium before performing any procedures that will be described below.

Installing update KB2852386

It should be noted that unlike the Windows 8 and later operating systems, the "seven" initially did not have a built-in tool for cleaning the folder "WinSxS", and using manual deletion, as mentioned above, is unacceptable. But, fortunately, update KB2852386 was later released, which contains a patch for the Cleanmgr utility and helps to solve the indicated problem. Therefore, first of all, you need to make sure that this update is installed on your PC or install it if not.

  1. Click "Start"... Go to "Control Panel".
  2. Click "System and safety".
  3. Go to Windows Update.
  4. In the lower left part of the window that appears, click on the inscription "Installed Updates".
  5. A window opens with a list of the updates installed on the computer. We need to find update KB2852386 in the section Microsoft Windows of this list.
  6. But the problem is that there can be a lot of items in the list, and therefore you risk spending a significant amount of time searching. To make things easier, place your cursor in the search field to the right of the address bar of the current window. Type in the following expression:

    After that, only the element with the above code should remain in the list. If you see it, then everything is in order, the required update is installed and you can immediately proceed to the methods of cleaning the folder "WinSxS".

    If the element is not displayed in the current window, then this means that in order to achieve the goals set in this article, you should complete the update procedure.

  7. Return to "Update centre"... This can be done quickly if you acted exactly according to the algorithm described above by clicking the arrow pointing to the left at the top of the current window to the left of the address bar.
  8. In order to make sure that your computer will see the necessary update, click on the inscription "Search for updates" on the left side of the window. This is especially important if you don't have auto-updates enabled.
  9. The system will search for updates not installed on your PC.
  10. After completing the procedure, click on the inscription "Important Updates Available".
  11. A list of important updates that are not installed on your PC will open. You can choose which of them to install by placing checkboxes to the left of the names. Check the box next to the name Update for Windows 7 (KB2852386)... Next click "OK".
  12. Back out the window "Update Center", press Install Updates.
  13. The process of installing the selected updates will start.
  14. After it finishes, restart your PC. Now you will have the necessary tool for cleaning the catalog. "WinSxS".

Method 1: "Command line"

The procedure we need can be performed using "Command line"through which the Cleanmgr utility is launched.

  1. Click "Start"... Click "All programs".
  2. Go to the folder "Standard".
  3. Find in the list "Command line"... Click on the name with the right mouse button ( PKM). Choose an option "Run as administrator".
  4. Activation in progress "Command line"... Type in the following command:

    Click Enter.

  5. A window opens where you are asked to select a disk in which cleaning will be performed. By default there should be a section C... Leave it if your operating system has a standard location. If, for any reason, it is installed on another disk, then select it. Click "OK".
  6. After that, the utility evaluates the amount of space that it can clean up during the corresponding operation. This may take a while, so please be patient.
  7. A list of system objects to be cleaned will open. Among them, be sure to find a position "Cleaning Windows Updates" (or Service Pack Backup Files) and place a checkmark next to it. It is this position that is responsible for cleaning the folder. "WinSxS"... Opposite the rest of the items, place the checkboxes at your discretion. You can remove all other marks if you do not want to clean anything else, or mark those components where you also want to remove "garbage". After that press "OK".

    Attention! In the window Disk Cleanup paragraph "Cleaning Windows Updates" may be absent. This means that there are no items in the "WinSxS" directory that could be deleted without negative consequences for the system.

  8. A dialog box will open asking if you really want to clear the selected components. Agree by clicking "Delete files".
  9. Next, the Cleanmgr utility will clean up the folder "WinSxS" from unnecessary files and then automatically close.

Method 2: Windows GUI

Not every user is comfortable running utilities through Command line... Most users prefer to do this using the OS graphical interface. This is perfectly doable with the Cleanmgr tool. This method, of course, is more understandable for a simple user, but, as you will see, it will take more time.

  1. Click "Start" and follow the inscription "A computer".
  2. In the opened window "Explorer" in the list of hard drives, find the name of the partition where the current Windows OS is installed. In most cases, this is a disk C... Click on it PKM... Choose "Properties".
  3. In the window that appears, click Disk Cleanup.
  4. Exactly the same procedure for evaluating the cleared space that we saw when using the previous method will be launched.
  5. In the window that opens, do not pay attention to the list of items to be cleaned, but click "Clean up system files".
  6. The free space on the drive will be re-evaluated, but this time taking into account the system elements.
  7. After that, the exact same window will open. Disk Cleanupthat we saw in Method 1... Next, you need to perform all the actions that were described in it, starting with point 7.

Method 3: Automatic cleaning "WinSxS"

In Windows 8, it is possible to configure a folder cleaning schedule "WinSxS" through "Task Scheduler"... Unfortunately, this feature is not available in Windows 7. Nevertheless, you can still schedule periodic cleaning through the same Command line, although without flexible schedule settings.


As you can see, in Windows 7 you can clear the folder "WinSxS" how through Command lineand through the OS graphical interface. You can also, by entering commands, schedule the periodic launch of this procedure. But in all the cases listed above, the operation will be performed using the Cleanmgr utility, a special update to which, if it is not available on the PC, must be installed through the standard Windows update algorithm. It is very important for any user to remember: clean the folder "WinSxS" manually by deleting files or using third-party programs is strictly prohibited.

For example, every time you run the Disk Cleanup utility, the contents of the% WinDir% \\ System32 \\ DISM folder are copied to the% LocalAppData% \\ Temp \\ (GUID) folder for some reason (and the temporary folder is not deleted after the operation is completed). After that, using the updated DLL, the deep cleaning function is programmatically called directly from the utility. However, the DISM folder was copied even before KB2852386 was released.

Ambiguities

There is reason to believe that the cleaning algorithm in Windows 7 is not exactly the same as in Windows 8 and above with the / StartComponentCleanup switch. In particular, for me and for readers not yet revealed file compression despite the identical text description in the cleanmgr utility. Check it out and write in the comments!

Another incomprehensible nuance is a cryptic phrase in a knowledge base article (the translation is mine):

Therefore, after you run the Disk Cleanup wizard, you may be unable to roll back to a superseded update.
After cleaning the disk, you may not be able to roll back to the update that was replaced by a more recent one.

And nowhere is it explained what this feature depends on :) In my experiment, all updates have the ability to delete, as it should be when using the / StartComponentCleanup switch in Windows 8 and newer. Perhaps, over time, the specifics will appear ...

Finally, it is not entirely clear what prevented this from being implemented earlier, and why the update appeared right now. By the way, there are no plans to move the cleanup to the DISM.exe utility in Windows 7, which does not allow processing offline images. Perhaps such a transfer exposes a whole layer of support issues related to servicing images.

How to automate cleaning the WinSxS folder

In Windows 8, cleaning is assigned to a separate scheduled task, and as a last resort, you can use the DISM.exe command-line utility. In Windows 7, the only method available so far is to create a customized configuration of the Disk Cleanup utility and add the resulting command to the scheduler.

Compressed folders are marked in blue. So far, I have not seen a single fact of compression in Windows 7.

Why the team doesn't work DISM / Online / Cleanup-Image / StartComponentCleanup?

Because it is for Windows 8 and newer. On Windows 7, use Disk Cleanup by following the instructions in this article.

To be continued…

Discussion

I have about the same questions for you as after publishing a similar article about Windows 8. But given the high percentage of Windows 7 owners, I expect to see more answers :)

You are welcome, write in the comments:

  1. Did you manage to optimize the WinSxS folder
  2. How much space did you save (you can convert bytes to gigabytes

Those users who have been using the Windows operating system for several years have probably noticed how quickly the "Windows" folder is filling up. Such a quick filling is due to the folder called "winsxs". It is she who weighs the most. Today I will tell you what this folder is in the operating systems Windows 7, 8, 10, how to clean it and whether it is worth deleting files in it.

What is the winsxs folder for?

You can all find this folder on your computer if you follow the path "C: / Windows / winsxs /". It is designed to store files of OS components. It also stores backups and updates to these files. Despite the fact that all these components may not be installed on your operating system, they are still stored in a folder and take up a lot of space on your computer disk.



By the way, I will clarify that I indicated the "C" in the description of the path, counting on the fact that it is systemic. Perhaps you have this folder on another drive.

In fact, the operating system components are not in this folder, but in other places. The files contained in "winsxs"are links to all these components. As soon as Windows updates are installed, the new files and their old copies will be located in this folder. Each time the updates grow in size, respectively, the folder" winsxs"fills up more and weighs more. It can end up taking up a lot of hard drive space.

The folder "winsxs "can weigh several gigabytes, or even tens of gigabytes. It is clear that this volume does not play a special role for modern hard drives. But for those who still have old hard drives, this amount of memory is of great importance and is far from superfluous. Learn, how much does the winsxs folder weigh", very simple. The standard way: right-click, select properties and the general tab. You will not know the actual size of the folder, then you can already judge the amount of free space. Be sure to remember the dimension of this folder, and better write it down. useful to compare the results of the work done.

I will immediately answer the question about deleting this folder. Manually remove "winsxs"no way. By removing it in the usual way, you will deprive the operating system of important components, without which it cannot function properly.

It is also better not to use cleaning programs. Therefore, you will have to use the standard operating system tools that will help reduce the size of the "winsxs". I will now tell you about several such methods.

Remove old updates via disk cleanup

This method can be applied to all operating systems Windows 7 and later. You can run the Disk Cleanup component in any of the following ways.

Open "My Computer", select the system disk and right-click on it. After that, in the context menu, open the" properties". Go to the tab" general". Here you need to remember the amount of free and used space on the hard disk. Next, click the" clear disk"and wait for the procedure to end.

The second way is through the command "execute". Press the key combination" Win + r". In the text entry field, write the command" cleanmgr"and press" Enter". Next, find the system disk and select it. Click" Ok"and wait for the system to finish counting the deleted data.

In the window that opens, press the button "Clear system files". If a UAC prompt pops up, click" yes" .

In order for the folder "winsxs"in Windows has been cleared, make sure that opposite the item" Clean Windows updates", there is a check mark. This section is responsible for deleting files in this folder. You can mark all other items as you wish. Also in this window you will see the approximate amount of free memory after cleaning. After all the items you need will be marked , click "OkThe cleaning process may take a little longer. Also, at the end of the procedure, you may need to restart your computer.

Clarification: The update cleanup feature on Windows 8 and 10 is built in automatically. There is no such thing in the seven. But, there is an update that will help you carry out the cleaning procedure in this software version. To do this, you need to download the KB2852386 update package and install it on Windows 7.

The rest of the methods that I will tell you about will not be able to help you if you have a seven installed.

Cleanup by Task Scheduler

In Windows 8 and 10, the developers took care of cleaning up the "winsxs". Therefore, in this OS the function of automatic cleaning became available. In this operating system there is an automatic task" StartComponentCleanup", which can be run in the background to delete old versions of files that are more than 30 days old. This time period is taken so as not to remove fresh updates. The utility is launched manually.

To start, you need to press the key combination "Win + r"and in the" execute "field write the command" taskschd.msc". You will see a new window. In the menu on the left, select the section" Task Scheduler Library", then find and open the section" Microsoft"and" Windows". Here we find the section" Servicing"open it. In it you will see the file" StartComponentCleanup", select it. On the right side of the window there are various items, you need to find" execute". This will start cleaning up the" winsxs"The procedure is not quick and can take about an hour.

The same cleaning can be done through the command line. We also call the command "execute"and enter" cmd". Then you need to enter the following command" schtasks.exe / Run / TN "\\ Microsoft \\ Windows \\ Servicing \\ StartComponentCleanup"and press" Enter"

Cleaning up via the command line

The Dism.exe program is a special cmd application that makes it possible to perform various manipulations with operating system components, including clearing the "winsxs". In Windows 8.1 and 10, there is a new parameter" AnalyzeComponentStore". Thanks to it, you can find out exactly how much space on your hard disk the folder" winsxs ".

We call the command line, as I have already described above, and enter the command "Dism.exe / Online / Cleanup-Image / AnalyzeComponentStore", then press" Enter" .

After the count is over, you will see if cleaning is worth it at all. In the items "Backups and disabled components"and" Cache and temporary data"you will see the data, the total value of whichwill show how much space the folder "winsxs"on your hard drive.

If the folder takes up a lot of space, proceed to cleaning it. This cleaning option differs from the previous one in that you do not have to wait an hour for the procedure to end. Run the command line as administrator and enter the following command "Dism.exe / online / Cleanup-Image / StartComponentCleanup" .

If you use the command "ResetBase", you can delete outdated versions of each component in the" winsxs". The command looks like this" Dism.exe / online / Cleanup-Image / StartComponentCleanup / ResetBase" .

In order to reduce the space for service packs, you must specify the parameter "Dism.exe / online / Cleanup-Image / SPSuperseded". After entering all the commands, press" Enter"and wait for the end of the procedure.

After that, you can estimate how much space was freed through the "AnalyzeComponentStore" .

Removing Windows components

In Windows 8 and 10 operating systems, it is possible to enable and disable OS components. These functions can be found in the "Programs" .

All components of the operating system are stored in our folder, regardless of whether they are enabled or not. Accordingly, they also occupy space. There is a method that will allow you to delete the data in the folder and free up space. Later, if necessary, you can easily load the components back.

To uninstall, run the command line as administrator and enter the command "DISM.exe / Online / English / Get-Features / Format: Table", press" Enter" .

This command will build a table of item names and their states. Remember the name of the element that needs to be removed and enter the following command "DISM.exe / Online / Disable-Feature / featurename: NAME / Remove". Instead of" NAME"you enter the name of the component you want.

Actually, that's all. Now you know several ways with which you can empty the "winsxs". I hope at least one of the ones I suggested will help you. Visit the site again if you liked the article or add it to your bookmarks.