This topic is about the different ways to reduce the size of the WinSxS folder on a running Windows 10, or later, installation.
Don't delete the WinSxS folder, you can instead reduce the size of the WinSxS folder using tools built into Windows. For more information about the WinSxS folder, see Manage the Component Store.
The operating system automatically reduces the size of the WinSxS folder by using methods similar to the ones described in this topic. Windows also uses internal processes to reduce the size of the WinSxS folder, such as uninstalling and deleting packages with components that have been replaced by other components with newer versions. Previous versions of some components are kept on the system for a period of time, allowing you to rollback if necessary. After a period of time, these older components are automatically removed from the installation.
You can also reduce the size of a Windows image using some of the same techniques, as discussed in Reduce the Size of the Component Store in an Offline Windows Image.
To learn about finding the size of your WinSxS folder, see Determine the actual size of the WinSxS folder.
Deleting files from the WinSxS folder or deleting the entire WinSxS folder may severely damage your system so that your PC might not boot and make it impossible to update.
You have a number of ways to start the cleanup of the component store, which use a combination of package deletion and component compression to clean up the WinSxS folder:
Task Scheduler
The StartComponentCleanup task automatically cleans up components when the system isn't in use. When run automatically, the task will wait at least 30 days after an updated component has been installed before uninstalling the previous versions of the component.
If you choose to run this task, the task will have a 1 hour timeout and may not completely clean up all files.
Run the StartComponentCleanup task in Task Scheduler to clean up and compress components
If Task Scheduler is not open, start the Task Scheduler. For more information, see Start Task Scheduler.
Expand the console tree and navigate to Task Scheduler Library\Microsoft\Windows\Servicing\StartComponentCleanup.
The StartComponentCleanup task can also be started from the command line.
Dism.exe
The /Cleanup-Image parameter of Dism.exe provides advanced users more options to further reduce the size of the WinSxS folder. For more information, see DISM Operating System Package Servicing Command-Line Options.
Use the /StartComponentCleanup parameter
Using the /StartComponentCleanup parameter of Dism.exe on a running version of Windows10 or later gives you similar results to running the StartComponentCleanup task in Task Scheduler, except previous versions of updated components will be immediately deleted (without a 30 day grace period) and you will not have a 1-hour timeout limitation.
Use the /ResetBase switch with the /StartComponentCleanup parameter
Using the /ResetBase parameter together with the /StartComponentCleanup parameter of DISM.exe on a running version of Windows10 or later removes all superseded versions of every component in the component store.
All existing update packages can't be uninstalled after this command is completed, but this won't block the uninstallation of future update packages.
Use the /SPSuperseded parameter
To reduce the amount of space used by a Service Pack, use the /SPSuperseded parameter of Dism.exe on a running version of Windows to remove any backup components needed for uninstallation of the service pack. A service pack is a collection of cumulative updates for a particular release of Windows.
From an elevated command prompt, run:
Dism.exe /online /Cleanup-Image /SPSuperseded
Warning
The service pack cannot be uninstalled after this command is completed.
Disk Cleanup
You can use Disk Cleanup to reduce the number of unnecessary files on your drives, which can help your PC run faster. It can delete temporary files and system files, empty the Recycle Bin, and remove a variety of other items that you might no longer need. The option to cleanup updates helps reduce the size of the component store.
Run Disk Cleanup to delete system files
To delete system files run the steps as provided in Delete files using Disk Cleanup.
Manage the Component Store
Determine the Actual Size of the WinSxS Folder
Reduce the Size of the Component Store in an Offline Windows Image
How to address disk space issues that are caused by a large Windows component store (WinSxS) directory
Open Start. Search for Command Prompt, right-click the top result, and select the Run as administrator option. Type the following command to determine the size of the WinSxS folder and press Enter: dism /online /Cleanup-Image /StartComponentCleanup.
Every additional update installation for the installed products such as hotfixes, cumulative updates, or service pack setups also store their relevant . msp or . msi file in the Windows Installer cache. Over time, this folder may grow larger.
Another way to reduce the size of the WinSxS directory on Windows 10 is to compress the directory contents on the level of the NTFS file system. Note. As in case of any non-standard intervention into the system configuration, you are strongly recommended to create a full backup of your Windows 10 image.
The /startcomponentcleanup switch should work. That was the one that cleared out the WinSxS/temp/pendingdelete folder in this thread. I routinely use Dism.exe /online /Cleanup-Image /StartComponentCleanup after every cumulative update and none of my PCs have anything in their pendingdelete folder.
WinSxS is a crucial component in Windows operating systems. It's a folder that stores multiple versions of system files, allowing different applications to use the version they're compatible with. This helps avoid conflicts and ensures smooth operation.
If you do not want to clean up the WinSxS folder, but only reduce its size, you can simply use the normal hard disk cleaning function. Use the cleanmgr tool for this. Press the [Windows] key and search for cleanmgr. Alternatively, you can start the application via the “Run” dialog, which you open via [Windows] + [R].
On your keyboard, press the Windows and R keys at the same time to open the Run window.Type cleanmgr, then press ENTER. The Disk Cleanup window should appear. Select the drive you want to clean, then click OK.
To learn about finding the size of your WinSxS folder, see Determine the actual size of the WinSxS folder. Deleting files from the WinSxS folder or deleting the entire WinSxS folder may severely damage your system so that your PC might not boot and make it impossible to update.
Windows suggests different types of files you can remove, including recycle bin files, Windows Update Cleanup files, upgrade log files, device driver packages, temporary internet files, and temporary files.
Use the command Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore to start the WinSxS folder analysis to find out how much storage space is actually being used. Then enter the command Dism.exe /Online /Cleanup-Image /spsuperseded to start the cleanup process.
You have to make sure that the Temporary Files option is selected. Click on the Remove Files button. This will clean up the temporary files in the AppData folder.
It's just removing files that were put in place to perform the update, you are not losing your personal files or applications. Updates generally have to add new/duplicate updated files, and sometimes install small programs in order to perform checks and actions in order to install said update.
Address: Suite 751 871 Lissette Throughway, West Kittie, NH 41603
Phone: +2366831109631
Job: Sales Producer
Hobby: Creative writing, Motor sports, Do it yourself, Skateboarding, Coffee roasting, Calligraphy, Stand-up comedy
Introduction: My name is Laurine Ryan, I am a adorable, fair, graceful, spotless, gorgeous, homely, cooperative person who loves writing and wants to share my knowledge and understanding with you.
We notice you're using an ad blocker
Without advertising income, we can't keep making this site awesome for you.