Clean Up the WinSxS Folder (2024)

  • Article

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.

Warning

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

  1. If Task Scheduler is not open, start the Task Scheduler. For more information, see Start Task Scheduler.

  2. Expand the console tree and navigate to Task Scheduler Library\Microsoft\Windows\Servicing\StartComponentCleanup.

  3. Under Selected Item, click Run

    schtasks.exe /Run /TN "\Microsoft\Windows\Servicing\StartComponentCleanup"

    Note

    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.

    From an elevated command prompt, run:

    Dism.exe /online /Cleanup-Image /StartComponentCleanup

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.

    From an elevated command prompt, run:

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

    Warning

    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

Clean Up the WinSxS Folder (2024)

FAQs

Can the WinSxS folder be cleaned up? ›

Cleaning up WinSxS folder

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.

Is it OK to delete files in WinSxS? ›

While it might be tempting to delete the files in the "C:\Windows\WinSxS\Temp\PendingDeletes" folder to free up space, it's generally not recommended.

Why is my WinSxS folder so large? ›

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.

Can I compress a WinSxS folder? ›

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.

How do I delete my WinSxS temp? ›

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.

What is stored in the WinSxS 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.

How do I stop WinSxS from growing? ›

Here are the steps:
  1. Open Command Prompt as an administrator.
  2. Type the following command and press Enter: dism.exe /online /Cleanup-Image /StartComponentCleanup.
  3. Wait for the process to complete. ...
  4. Type the following command and press Enter: dism.exe /online /Cleanup-Image /SPSuperseded.
  5. Wait for the process to complete.
Dec 12, 2023

How to clear WinSxS cache? ›

Method 4: Use storage sense
  1. Right-click on the Windows button in the screen's bottom-left corner and choose Settings.
  2. Go to System.
  3. Choose Storage under System on the left pane.
  4. Head to the Local Disk C section and click on Temporary files. ...
  5. Clear the selected checkboxes and choose Windows Update Cleanup.

How big should the WinSxS folder be? ›

This Hidden Score Shows You How Well Your PC Runs Windows

That's where you might stumble upon the WinSxS folder. It has a size of almost 5–10GB, and for many users, it's like a black box in the Windows world.

How to reduce the size of the WinSxS directory and free up disk space on Windows Server 2012? ›

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].

How to clean up a Windows folder? ›

To delete temporary files:
  1. In the search box on the taskbar, type disk cleanup, and select Disk Cleanup from the list of results.
  2. Select the drive you want to clean up, and then select OK.
  3. Under Files to delete, select the file types to get rid of. To get a description of the file type, select it.
  4. Select OK.

Where is the Disk Cleanup? ›

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.

Is it safe to clean up WinSxS? ›

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.

What files can I delete to free up space? ›

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.

How to reduce the size of the WinSxS directory and free up disk space on Windows Server 2012 using features on demand? ›

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.

How to clean up an AppData folder? ›

2. Through the settings app
  1. Press Win + I to open the settings apps.
  2. Navigate to System > Storage.
  3. Click on Temporary files.
  4. 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.
Dec 18, 2023

What does it mean when Windows Update says cleaning up? ›

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.

Top Articles
11 Sinking Fund Categories For Your Financial Wealth (&60 More!)
55 Things to Stop Buying to Save Money in 2023 - Boss Single Mama
Skigebiet Portillo - Skiurlaub - Skifahren - Testberichte
Live Basketball Scores Flashscore
Mate Me If You May Sapir Englard Pdf
Craigslist Benton Harbor Michigan
Costco The Dalles Or
Sissy Hypno Gif
Arrests reported by Yuba County Sheriff
Mawal Gameroom Download
Victoria Secret Comenity Easy Pay
Wmlink/Sspr
Globe Position Fault Litter Robot
Seafood Bucket Cajun Style Seafood Restaurant in South Salt Lake - Restaurant menu and reviews
Teenleaks Discord
Michigan cannot fire coach Sherrone Moore for cause for known NCAA violations in sign-stealing case
Ms Rabbit 305
/Www.usps.com/International/Passports.htm
Daytonaskipthegames
Never Give Up Quotes to Keep You Going
Melendez Imports Menu
Masterkyngmash
Dragger Games For The Brain
Finding Safety Data Sheets
Kimoriiii Fansly
Arlington Museum of Art to show shining, shimmering, splendid costumes from Disney Archives
Big Boobs Indian Photos
Greyson Alexander Thorn
LEGO Star Wars: Rebuild the Galaxy Review - Latest Animated Special Brings Loads of Fun With An Emotional Twist
Muma Eric Rice San Mateo
Chris Provost Daughter Addie
Best Weapons For Psyker Darktide
October 31St Weather
Studio 22 Nashville Review
RALEY MEDICAL | Oklahoma Department of Rehabilitation Services
Albertville Memorial Funeral Home Obituaries
Wait List Texas Roadhouse
Lonely Wife Dating Club בקורות וחוות דעת משתמשים 2021
Discover Things To Do In Lubbock
Emily Browning Fansite
Tricare Dermatologists Near Me
Yakini Q Sj Photos
Gli italiani buttano sempre più cibo, quasi 7 etti a settimana (a testa)
Craigslist Mendocino
Swsnj Warehousing Inc
Backpage New York | massage in New York, New York
Devotion Showtimes Near Showplace Icon At Valley Fair
Star Sessions Snapcamz
15:30 Est
Costco Tire Promo Code Michelin 2022
Latest Posts
Article information

Author: Laurine Ryan

Last Updated:

Views: 5633

Rating: 4.7 / 5 (57 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Laurine Ryan

Birthday: 1994-12-23

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.