ESX Virtualization

VMware ESXi, vSphere, VMware Backup, Hyper-V... how-to, videos....

Nakivo Backup and Replication - #1 Backup solution for Virtual, physical, cloud, NAS and SaaS

Menu
  • Certification
      • VCP-DCV vSphere 8
          • vcp2024-125.
        • Close
    • Close
  • VMware
    • Configuration Maximums
    • vSphere
      • vSphere 8.0
      • vSphere 7.0
      • vSphere 6.7
      • vSphere 6.5
      • vSphere 6.0
      • Close
    • VMworld
      • VMware EXPLORE 2024
      • VMware EXPLORE 2023
      • VMware EXPLORE 2022
      • VMworld 2019
      • VMworld 2018
      • VMworld 2017
      • VMworld 2016
      • VMworld 2015
      • VMworld 2014
      • VMworld 2013
      • VMworld 2012
      • VMworld 2011
      • Close
    • Close
  • Microsoft
    • Windows Server 2012
    • Windows Server 2016
    • Windows Server 2019
    • Close
  • Categories
    • Tips – VMware, Microsoft and General IT tips and definitions, What is this?, How this works?
    • Server Virtualization – VMware ESXi, ESXi Free Hypervizor, VMware vSphere Server Virtualization, VMware Cloud and Datacenter Virtualization
    • Backup – Virtualization Backup Solutions, VMware vSphere Backup and ESXi backup solutions.
    • Desktop Virtualization – Desktop Virtualization, VMware Workstation, VMware Fusion, VMware Horizon View, tips and tutorials
    • How To – ESXi Tutorials, IT and virtualization tutorials, VMware ESXi 4.x, ESXi 5.x and VMware vSphere. VMware Workstation and other IT tutorials.
    • Free – Free virtualization utilities, ESXi Free, Monitoring and free backup utilities for ESXi and Hyper-V. Free IT tools.
    • Videos – VMware Virtualization Videos, VMware ESXi Videos, ESXi 4.x, ESXi 5.x tips and videos.
    • Home Lab
    • Reviews – Virtualization Software and reviews, Disaster and backup recovery software reviews. Virtual infrastructure monitoring software review.
    • Close
  • Partners
    • NAKIVO
    • StarWind
    • Zerto
    • Xorux
    • Close
  • This Web
    • News
    • ESXi Lab
    • About
    • Advertise
    • Archives
    • Disclaimer
    • PDFs and Books
    • Close
  • Free
  • Privacy policy

3 Ways To Shrink WinSXS Folder

By Vladan SEGET | Last Updated: July 3, 2014

Shares

With the time and new patches installed to Windows installations, the Windows WinSxS folder present since W7, W2008, W8 and in W8.1 gets more and more “fat” and takes valuable space. I've previously reported on easy way to shrink that winsxs folder in Windows 7 by installing a patch which adds a new function to the default Windows cleaning wizard and allows to select Windows unused patches left behind taking valuable space. The details can be found in this post. Today I'll show 3 Ways To Shrink WinSXS Folder.

Some of the commands works in W8.1 but not W8.0. Same for 2012R2 (W2012). Let's start with the easy way by going through the cleaning assistant (is also present if you add “Desktop Experience” feature on 2008R2 and W2012, W2012R2) then through one tweak and finish with some CLI commands.

01. The Disk Cleanup Wizard

Well, if you're running W 7 SP1 (or W8.x) with the patch I talked in my previous post, then it's no brainer. It's an effective way to select the unnecessary patches and clean all bunch of other stuff from within the guest OS. It's also useful to do that just before you Image the system or just before you transform the VM into the template.

The wizard's screen:

Wizard

An update for 2008R2 systems listed in KB article KB2852386, allows using the same wizard in 2008R2, but you need to add “Desktop experience” feature. You can download the update for Windows 2008 R2 from here.

On a Windows Server 2012 R2 the same punition – after you install Desktop Experience feature only.

Note that there is also another method which avoids installing the desktop experience feature to your windows system, but it's unsupported by Microsoft. It consists of copying in the appropriate Disk Cleanup/CleanMgr files into the appropriate location can be done, but at your own risk.

02. Some ClI commands with DISM.exe

First, determine the size of the component store (winsxs) on Windows Server 2012 R2:

Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore

Running this command analyzes the component store to shows the size and gives an advice if cleanup is recommended.

If yes, then execute this command:

Dism.exe /online /Cleanup-Image /StartComponentCleanup

What it does? It removes previous versions of the files updated by Windows Updates.

03.Use the “ResetBase” parameter of Dism.exe

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

From an elevated command prompt, type the following:

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

But this will makes impossible to uninstall any existing updates and service packs! (so caution). Make sure that you don't need to uninstall any patches past this point… This command works on W8.1 and W2012R2 only.

You can see only slight improvements on my laptop as I executed this command already in the past….

How to Shrink WinSxS folder

If you have previously installed a Service Pack to your system, then you can use another command which cleans up the backup files created before installing this SP.

dism /online /cleanup-image /SPSuperseded

Additional ways of cleaning the default C: drive in general:

  • Move the paging file to another volume on the system.
  • Disable hibernation on the system (saves some Gb of space depending on how much RAM the system has).
  • Use the dedicated dump file option to capture memory dump files on another volume on the system.
  • Offload user profile and program file directories to another volume on the system.
  • Delete all but last restore point OR, completely disable system restore points.

You can also uninstall some software > add an additional hard drive > format and add a drive letter > reinstall the software on that drive.

The problem with “fat” WinSxS folder is that especially on systems with 1st or 2nd generation SSD drives which provided less capacity than today's modern SSDs which offers at least 256Gb. So getting some space back is always good -:). Hope it helps.

Shares
4.2/5 - (4 votes)

| Filed Under: Server Virtualization

About Vladan SEGET

This website is maintained by Vladan SEGET. Vladan is as an Independent consultant, professional blogger, vExpert x16, Veeam Vanguard x9, VCAP-DCA/DCD, ESX Virtualization site has started as a simple bookmarking site, but quickly found a large following of readers and subscribers.

Connect on: Facebook. Feel free to network via Twitter @vladan.

Comments

  1. Paul says

    June 12, 2015 at 5:17 pm

    windows 7 winsxs will not clear.
    Have KB for cleanmgr installed (removed and reinstalled it as well)

    cleanmgr shows 409 MB from updates applied today, but the size of the winSXS folder is 11.5 G!

    This is a VM but wanted to know if you had any thoughts on getting this cleaned up.

  2. junaid says

    February 21, 2016 at 11:56 pm

    i need to reduce the winsxs folder size but window update cleanup option is not show in disk cleanup utility i also installed required feature and window is also update kindly advice how to reduce the winsxs folder

Private Sponsors

Featured

  • Thinking about HCI? G2, an independent tech solutions peer review platform, has published its Winter 2023 Reports on Hyperconverged Infrastructure (HCI) Solutions.
  • Zerto: One Platform for Disaster Recovery, Backup & Cloud Mobility: Try FREE Hands-On Labs Today!
Click to Become a Sponsor

Most Recent

  • Veeam confirming vSphere 9.0 and ESXi 9 upcoming support
  • Veeam Backup & Replication v13 Beta: A Game-Changer with Linux
  • What is Veeam Data Cloud Vault and how it can help SMBs
  • Nakivo Backup and Replication – Malware Scan Feature
  • Zerto 10 U7 released with VMware NSX 4.2 Support
  • XorMon NG 1.9.0 Infrastructure Monitoring – now also with Veeam Backup Support
  • Heartbeat vs Node Majority StarWind VSAN Failover Strategy
  • Vulnerability in your VMs – VMware Tools Update
  • FREE version of StarWind VSAN vs Trial of Full version
  • Commvault’s Innovations at RSA Conference 2025 San Francisco

Get new posts by email:

 

 

 

 

Support us on Ko-Fi

 

 

Buy Me a Coffee at ko-fi.com

Sponsors

Free Trials

  • DC Scope for VMware vSphere – optimization, capacity planning, and cost management. Download FREE Trial Here.
  • Augmented Inline Deduplication, Altaro VM Backup v9 For #VMware and #Hyper-V – Grab your copy now download TRIAL.

VMware Engineer Jobs

VMware Engineer Jobs

YouTube

…

Find us on Facebook

ESX Virtualization

…

Copyright © 2025 ·Dynamik-Gen · Genesis Framework · Log in