How to Check the Size and Reclaim Disk Space from WinSxS in Windows 8.1 [1]
Windows 7 and 8.x use a folder in the Windows directory called "WinSxS" to store certain system components and a variety of temporary and backup files. At times this folder can grow quite large and a previous tip [3] showed how to free up disk space by reducing the folder’s size in Windows 7. Here are some additional methods that are useful in Windows 8.1.
Determining the size of WinSxS and checking if it needs cleanup
Windows 8 introduced some automatic checking and cleaning of the WinSxS folder but this is done only every 30 days. Windows 8.1 added a command-line tool to check if cleanup is needed. To see if cleanup is recommended, use this procedure.
- Right-click the Windows flag in the lower-left corner of your screen
- Select “Command Prompt (Admin)"
-
In the command prompt window, enter the command:
Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore
The analysis will proceed. Depending on your system, this may take 5-10 minutes or more. The graphic below shows a typical command prompt window that results.
In this example, cleanup is recommended. The analysis also reports various statistics about the contents of WinSxS. One thing to be aware of is that the reported size of the WinSxS folder can be misleading. The folder contains hard links to various files, whose contents are included in the reported size of WinSxS. The files are actually stored in other locations. In the example here, the size of WinSxS is reported to be 6.30 GB. However, 4.75 GB are indicated as “Shared with Windows” and the actual sizes of interest are "Backups and Disabled Features : 1.34 GB" and "Cache and Temporary Data : 201.76 MB". For further discussion of the actual size of WinSxS, see this Microsoft Technet article [4].
Cleaning up WinSxS
If cleanup is recommended, there are several cleanup methods. For component cleanup, do the following:
- Right-click the Windows flag in the lower-left corner of your screen
- Select “Command Prompt (Admin)
-
In the command prompt window, enter the command:
Dism.exe /online /Cleanup-Image /StartComponentCleanup
For even more cleaning, you can remove the backups that allow you to uninstall Windows updates and service packs. Once these are removed, however, you cannot uninstall existing updates. This is the procedure:
- Right-click the Windows flag in the lower-left corner of your screen
- Select “Command Prompt (Admin)
-
In the command prompt window, enter the command:
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
Depending on your system, this cleanup procedure can take considerable time.
Warning
Do not go directly to WinSxS with File Explorer and delete files. Microsoft warns that directly deleting files from WinSxS may severely damage your system so that your PC might not boot or might become impossible to update.
More information
- WinSxS Folder in Windows 7 | 8 explained [5] – A good description of the purpose of the WinSxS folder
- Determine the Actual Size of the WinSxS Folder [4] - Microsoft Technet article
- Clean Up the WinSxS Folder [6] - Microsoft Technet article describing different cleanup procedures
Get your own favorite tip published! Know a neat tech tip or trick? Then why not have it published here and receive full credit? Click here to tell us your tip. [7]
This tips section is maintained by Vic Laurie [8]. Vic runs several websites with Windows how-to's, guides, and tutorials, including a site for learning about Windows and the Internet [9] and another with Windows 7 tips [10].
Click here [11] for more items like this. Better still, get Tech Tips delivered via your RSS feeder [12] or alternatively, have the RSS feed sent as email [13] direct to your in-box.