WinSxS Folder (Component Store) - Clean Up in Windows 8.1

How to Clean Up the WinSxS Folder (Component Store) in Windows 8.1


information   Information
The WinSxS folder is located in the Windows folder, for example C:\Windows\WinSxS. It’s the location for Windows Component Store files. The Windows Component Store is used to support the functions needed for the customization and updating of Windows. Here are some examples of how the Windows Component Store files are used:

  • Using Windows Update to install new component versions. This keeps systems secure and up-to-date.
  • Enabling or disabling Windows features.
  • Adding roles or features using Server Manager.
  • Moving systems between different Windows Editions.
  • System recovery from corruption or boot failures.
  • Uninstalling problematic updates.
  • Running programs using side-by-side assemblies.

One commonly asked question is can I delete the WinSxS folder to regain some disk space? The short answer is no. (see warning box below) However, there are ways to reduce the size of the WinSxS folder.

Windows 8.1 and Windows Server 2012 R2 automatically reduces the size of the WinSxS by using methods similar to the ones described in this tutorial, however these methods also include internal processes, 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 components are removed from the installation.

For more information about the component store, see:


This tutorial will show you a number of ways to start the cleanup of the component store (WinSxS folder) to free up a large amount of disk space in Windows 8.1 and Windows Server 2012 R2.

warning   Warning
Manually 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.

Use one of the recommended options you would like to do in this tutorial below instead.






In Preparation

Do this Tip First before doing an Option below


Tip   Tip
If you have not already, use the tutorial at the link below to determine if component store cleanup is recommended or not first. This way you can also see how much space will be recovered.

How to Determine Size and if you should Clean Up Component Store (WinSxS folder) in Windows 8.1

There's no need to do any of the options below if component store cleanup is not recommended at the link above.


CONTENTS:

  • Option One: To Clean Up WinSxS Folder using StartComponentCleanup Task
  • Option Two: To Clean Up WinSxS Folder using /StartComponentCleanup with Dism
  • Option Three: Clean Up WinSxS Folder using /StartComponentCleanup and /ResetBase with Dism
  • Option Four: To Clean Up WinSxS Folder using /SPSuperseded with Dism
  • Option Five:To Clean Up WinSxS Folder using Windows Update Cleanup in Disk Cleanup





OPTION ONE

To Clean Up WinSxS Folder using StartComponentCleanup Task



Note   Note
The StartComponentCleanup task was created in Windows 8 to regularly clean up components automatically when the system is not in use. This task is set to run automatically when triggered by the operating system. 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.


1. Press the :winkey: + R keys to open the Run Dialog, type Taskschd.msc, and press Enter.​
2. If prompted by UAC, then click/tap on Yes.​
3. In the left pane of Task Scheduler, expand the console tree, and navigate to and open Servicing at location below. (see screenshot below)​
Task Scheduler Library\Microsoft\Windows\Servicing
StartComponentCleanup_Task.jpg

4. In the middle pane of Servicing, select the StartComponentCleanup task, and click/tap on Run under Selected Item in the right pane. (see screenshot above)​
5. You'll now notice that the StartComponentCleanup task is now running. This will take a while to finish running. (see screenshot below).​
Task_Running.jpg

6. If you like, you can close Task Scheduler since it's not required to remain open. It's recommended to let the computer stay running or sit idle until the task has finished running.​





OPTION TWO

To Clean Up WinSxS Folder using /StartComponentCleanup with Dism



Note   Note
Using the /StartComponentCleanup parameter of Dism.exe on a running version of Windows 8.1 gives you similar results to running the StartComponentCleanup task in OPTION ONE above, 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.


2. In the elevated command prompt, copy and paste the command below, and press Enter. (see screenshot below)​
Dism.exe /online /Cleanup-Image /StartComponentCleanup
StartComponentCleanup_command.png

3. When successfully finished, you can close the elevated command prompt if you like. This could take a while to finish depending on how much there was to clean up.​






OPTION THREE

To Clean Up WinSxS Folder using /StartComponentCleanup and /ResetBase with Dism



Note   Note
Using the /ResetBase switch with the /StartComponentCleanup parameter of DISM.exe on a running version of Windows 8.1 removes all superseded (outdated) versions of every component in the component store.


:warn: All existing service packs and updates cannot be uninstalled after this command is completed. This option will not block the uninstallation of future service packs or updates installed.


2. In the elevated command prompt, copy and paste the command below, and press Enter. (see screenshot below)​
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
StartComponentCleanup_ResetBase_command.png

3. When successfully finished, you can close the elevated command prompt if you like. This could take a while to finish depending on how much there was to clean up.​





OPTION FOUR

To Clean Up WinSxS Folder using /SPSuperseded with Dism



Note   Note
To reduce the amount of space used by a Service Pack, use the /SPSuperseded parameter of Dism.exe on a running version of Windows 8.1 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.


:warn: The service pack cannot be uninstalled after this command is completed.


2. In the elevated command prompt, copy and paste the command below, and press Enter. (see screenshot below)​
Dism.exe /online /Cleanup-Image /SPSuperseded
(If no service pack backup files found)​
SPSuperseded_command-1.png

3. When successfully finished, you can close the elevated command prompt if you like. This could take a while to finish depending on how much there was to clean up.​





OPTION FIVE

To Clean Up WinSxS Folder using Windows Update Cleanup in Disk Cleanup



Note   Note
This option is to use the Windows Update Cleanup option in Disk Cleanup to delete outdated Windows updates from the WinSxS folder (component store) to free up hard drive space.


Windows_Update_Cleanup.png




That's it,
Shawn


 

Attachments

  • Windows_drive.png
    Windows_drive.png
    9.3 KB · Views: 393
Last edited by a moderator:
What about Windows 8? my winsxs folder is 11GB, and I have 1.31GB in windows update clean up That won't delete in disk clean up system files, and i'm noticing that MS thinks everyone has updated from Windows 8! No info for Windows 8!
 

My Computer

System One

  • OS
    windows 8

My Computer

System One

  • OS
    64-bit Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
No way, I want Windows 8 to work properly first, 8.1 is just another can of worms. I have had a appcrash with msfeedssync.exe, after I had a forced refresh a week ago, Ran sfc/scannow NO integrity violations. Then ran DISM.exe scanhealth (win 8) No problem with component store. Then I ran app diagnostics and it said it's fixed (Image)Screenshot (5).png still appcrash not fixed.
 

My Computer

System One

  • OS
    windows 8
Hi,
I am experiencing problem with using Disk Cleanup. I tried to clean up the "Windows Update Cleanup" - 196MB but couldn't!


I press OK, the Disk Cleanup would process the "Windows Update Cleanup" part really fast (by looking at the progress bar) as if it skipped the entire part. Then when I ran Disk Cleanup again, the "Windows Update Cleanup" would show 196MB again!


Untitled.png


This is driving me crazy! I tried:


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


I am looking for a solution here pls.


Thanks!
 

My Computer

System One

  • OS
    8.1
    Computer type
    Laptop
Hello Nathan, and welcome to Eight Forums.

If you haven't already, restart the computer, and try Option Three again to see if it may help. :)
 

My Computer

System One

  • OS
    64-bit Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
Odd. Did you run the command in an elevated command prompt?
 

My Computer

System One

  • OS
    64-bit Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone

My Computer

System One

  • OS
    8.1
    Computer type
    Laptop
Usually it only deletes anything that's 30-days and older, but that command should have overridden that.
 

My Computer

System One

  • OS
    64-bit Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone

My Computer

System One

  • OS
    64-bit Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
Used option 3 and went from 7.74GB down to 5.87GB. Not bad!
 

My Computer

System One

  • OS
    Windows 10 Pro X64
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Lenovo IdeaCenter K450
    CPU
    Intel Quad Core i7-4770 @ 3.4Ghz
    Motherboard
    Lenovo
    Memory
    16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
    Graphics Card(s)
    Intel Integrated HD Graphics
    Sound Card
    Realtek HD Audio
    Monitor(s) Displays
    HP h2207
    Screen Resolution
    1680x1050@59Hz
    Hard Drives
    250GB Samsung EVO SATA-3 SSD;
    2TB Seagate ST2000DM001 SATA-2;
    1.5TB Seagate ST3150041AS SATA
    PSU
    500W
    Keyboard
    Wired USB
    Mouse
    Wired USB
    Internet Speed
    3GB Up, 30GB Down
    Browser
    SeaMonkey
    Antivirus
    Windows Defender; MBAM Pro
    Other Info
    UEFI/GPT
    PLDS DVD-RW DH16AERSH
Always wondered how to do this, thanks brink.
 

My Computer

System One

  • OS
    Windows 8.1
    Computer type
    PC/Desktop
    Memory
    6GB
    Screen Resolution
    1600 x 900
    Internet Speed
    60mpbs
    Browser
    Opera
    Antivirus
    Emsisoft Anti-Malware
Hi

I am a bit confused as to what the difference between Option 3 & Option 4 is

Which deletes more items and makes regains more space Option 3 or Option 4

Is Option 3 better that Option 4 or vice versa, If so why

Could any of you geniuses who don't work for Apple answer pls.
 

My Computer

System One

  • OS
    Win 8.1 Up 1
Hi

I am a bit confused as to what the difference between Option 3 & Option 4 is

Which deletes more items and makes regains more space Option 3 or Option 4

Is Option 3 better that Option 4 or vice versa, If so why

Could any of you geniuses who don't work for Apple answer pls.

Hello Caprone, and welcome to Eight Forums. :)

Option 3 would clean more. It includes out of date updates and service packs.

Option 4 is only for cleaning out of date service packs.
 

My Computer

System One

  • OS
    64-bit Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
Hi

I am a bit confused as to what the difference between Option 3 & Option 4 is

Which deletes more items and makes regains more space Option 3 or Option 4

Is Option 3 better that Option 4 or vice versa, If so why

Could any of you geniuses who don't work for Apple answer pls.

Hello Caprone, and welcome to Eight Forums. :)

Option 3 would clean more. It includes out of date updates and service packs.

Option 4 is only for cleaning out of date service packs.

Thank you Brink for clarifying that. It helps a lot for cleanups.;)
 

My Computer

System One

  • OS
    Win 8.1 Up 1
You're most welcome. :)
 

My Computer

System One

  • OS
    64-bit Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
Back
Top