How to Reduce the Size of the WinSxS Directory and Free Up Disk Space on Windows Server

The WinSxS directory is a huge folder, and it keeps growing bigger day by day storing necessary and unnecessary files. It contains all the Windows system components and grabs a massive disk space in your system. This space consumption keeps building up because sometimes a user might not have enough permission, even with the administrator’s account that he/ she can delete them.

As per Microsoft, the old files and links of some installations and updates are just kept if in case the user might want them back in the future. And within the time, the old files and links are automatically removed. But if that doesn’t happen in your case, you might need to do it manually with the methods explained below:

Methods to reduce the size of the WinSxS Directory and Free Up Disk Space on Windows Server

How to Reduce the Size of the WinSxS Directory and Free Up Disk Space on Windows Server

When the WinSxS directory is packed massively, it might slow down the speed of your virtual machine and cause some fundamental issues in your way while using it. The methods explained below will help you to quickly reduce the size of WinSxS and create some free disk space.

METHOD 1: Run disk cleanup

  • Open the File Explorer from the desktop or through the Windows search bar.
  • From the left pane of options, click on ‘This PC.’
  • Now from the newly appeared options, locate ‘Local Disk (C:/),’ right-click on it and select ‘Properties.’
  • On the Properties window, go to the General tab and click on the icon ‘Disk Clean up.’ It will now calculate the disk space consumed on your system. The process might take a few seconds or minutes; hence be patient and do not leave the page.
  • Once the calculation process is done, a new window will appear, from where you can select files that you want to delete. Select the files and click on OK.
  • Now to confirm the permanent deletion, click on ‘Delete files.’ Wait for a while until the cleanup utility removes some unnecessary files.

Once done, you can check the ‘File Explorer’ again to figure out how much Disk space is cleared.

METHOD 2: Permanently remove the old files from WinSxS

Another method to reduce the size of the WinSxS directory and free up some disk space is permanently removing some old unrequired files. This process is a bit risky as one might end up deleting essential files leading to serious trouble with Windows behavior in the future. Hence, we suggest you create a backup of images and necessary files beforehand.

Advertisements

Note: This method might result in problematic aftereffects; hence try it at your own risk.

  • Open the File Explorer and go to ‘This PC.’
  • From the newly appeared options, locate ‘Local Disk (C:/),’ right-click on it and select ‘Properties.’
  • Go to the ‘Security’ tab and then click on the ‘Advanced’ tab (at the bottom-right) for opening the ‘Special permissions.’
  • Now on the newly appeared ‘Advanced security setting for local disk (C:/)’ window, click on the option ‘Change.’ (You can find it the top left of the page).
  • Here enter the object name that you use for running a Windows machine.
  • Now click ‘Check names’ followed by OK and then ‘Apply.’
  • Here you would require to check whether you have taken ownership of this object. For doing so, close and then again open the object’s properties before you finally view or change permissions.
  • Click on ‘Edit’ and then ‘Add.’ Here again, enter object name that you use for running Windows.
  • Click on the ‘Check names’ option.
  • Here select the ‘Account,’ allow full control permission, and then click on Yes for changing permission settings on system folders.
  • Click on Apply > OK and then close all of the open windows.
  • Lastly, delete the old files to free up disk space on the Windows server.

Once done, you can check whether the disk space is cleared and the size of WinSxs is reduced or not.

METHOD 3: Use DISM for reducing the Disk Size

The ‘Deployment Image Servicing and Management’ or DISM is a useful component that can reduce the disk size of WinSxS.

Note: Remember that you might not be able to uninstall any updates and existing service packs after the 2nd command is completed.

  • From the Windows search bar, type and open ‘Command prompt’ by selecting ‘Run as administrator.’ (Opening this tool with administrator’s access is mandatory).
  • Now on the command prompt window, type the following command, and press Enter.

dism.exe /Online /Clean-up Image /StartComponentCleanup

  • Once done, type the following command and press Enter. This command will remove all superseded versions of every component in the store.

dism.exe /Online /Clean-up Image / StartComponentCleanup /ResetBase

  • Finally, restart your computer and check whether the Disk size is reduced and space is cleared or not.

WinSxS directory is a folder that keeps growing with every windows update and ends up consuming a lot of disk space of your system. As this is a non-avoidable process, hence one cannot control the file and link build upon the Windows server.

By the end of this article, we hope you have got enough answers for your queries regarding loaded up WinSxS directory. These were the tried and tested methods that will help you to reduce the size of the WinSxS directory and free up disk space on the Windows server. If you have any queries or feedback, please write down the comment in the below comment box.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.