{"id":49804,"date":"2023-05-28T19:02:56","date_gmt":"2023-05-28T13:32:56","guid":{"rendered":"http:\/\/198.58.113.91\/blog\/?p=49804"},"modified":"2023-09-18T20:03:38","modified_gmt":"2023-09-18T14:33:38","slug":"cleanup-component-store-winsxs","status":"publish","type":"post","link":"https:\/\/www.winhelponline.com\/blog\/cleanup-component-store-winsxs\/","title":{"rendered":"How to Clean Up the Component Store (WinSxS folder)"},"content":{"rendered":"<p>The Component Store or the WinSxS folder, located under the Windows folder, is used to support the functions needed to customize and update Windows.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-49808\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/05\/winsxs-folder-contents.png\" alt=\"winsxs folder contents\" width=\"750\" height=\"273\" \/><!--more--><\/p>\n<p>Whenever a <a href=\"https:\/\/www.winhelponline.com\/blog\/windows-10-latest-cumulative-update-info-direct-download\/\">new update<\/a> or a <a href=\"https:\/\/www.winhelponline.com\/blog\/restore-missing-print-management-console-windows-10\/\">FOD package<\/a> is installed, it adds hundreds or thousands of files into the component store. The superseded components will be removed automatically by Windows at least 30 days after an update has been installed. To accomplish the task, Windows runs the built-in &#8220;<code>StartComponentCleanup<\/code>&#8221; task via Task Scheduler.<\/p>\n<p>In Task Scheduler, the &#8220;StartComponentCleanup&#8221; task is located here:<\/p>\n<pre>Task Scheduler Library\\Microsoft\\Windows\\Servicing\\StartComponentCleanup<\/pre>\n<p>It&#8217;s run as part of <a href=\"https:\/\/www.winhelponline.com\/blog\/automatic-maintenance-disable-schedule-windows-8-10\/\">Automatic maintenance<\/a>, which means the job is run only when the system is idle.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/08\/information-icon.png\" alt=\"\" width=\"24\" height=\"24\" class=\"alignleft size-full wp-image-9189\" \/>Manually cleaning up the component store is usually unnecessary unless your OS partition is acutely short of disk space where every GB counts.<\/p>\n<div class=\"rp\"><strong>RELATED:<\/strong> <a href=\"https:\/\/www.winhelponline.com\/blog\/free-up-hard-disk-space-windows\/\">How to Free Up Gigabytes of Disk Space in Windows 10\/11<\/a><\/div>\n<h2>Cleanup the Component Store (WinSxS folder)<\/h2>\n<p>To clean up the component store, open an admin Command Prompt and run the following:<\/p>\n<pre>schtasks.exe \/Run \/TN \"\\Microsoft\\Windows\\Servicing\\StartComponentCleanup\"<\/pre>\n<p>-or-<\/p>\n<pre>Dism.exe \/online \/Cleanup-Image \/StartComponentCleanup<\/pre>\n<p>-or-<\/p>\n<p>Launch Disk Cleanup (<code>cleanmgr.exe<\/code>), select the &#8220;Windows Update Cleanup&#8221; option and click OK.<\/p>\n<p><em><strong>Note:<\/strong> The Disk Cleanup method can take additional time to complete because it does more than cleaning up the supserseded items. Please see the explanation below.<\/em><\/p>\n<div class=\"qt\">\n<h4>Difference between the three methods<\/h4>\n<p>1) The &#8220;StartComponentCleanup&#8221; task, when launched manually, the task will have a 1-hour timeout and may not completely clean up all files. So it may need to be run twice if you have many superseded components on the device. Also, the 30-day grace period doesn&#8217;t apply when manually launching this task.<\/p>\n<p>2) The DISM command-line doesn&#8217;t have the 1-hour timeout limitation or the 30-day grace period.<\/p>\n<p>3) The Disk Cleanup&#8217;s &#8220;Windows Update Cleanup&#8221; handler does two things. <strong>First<\/strong>, it does the equivalent of <code>Dism \/Online \/Cleanup-Image \/StartComponentCleanup<\/code>. <strong>Secondly<\/strong>, it compresses the operating system files (if required) that aren\u2019t already compressed.<\/p>\n<div class=\"newline\">For more information about the &#8220;<a href=\"https:\/\/www.winhelponline.com\/blog\/free-up-hard-disk-space-windows\/\" rel=\"noopener\" target=\"_blank\">Windows Update Cleanup<\/a>&#8221; Disk Cleanup handler, please see the blog post of the Senior Microsoft employee Raymond Chen here \u2192 <a href=\"https:\/\/devblogs.microsoft.com\/oldnewthing\/20200922-00\/?p=104252\" rel=\"noopener nofollow\" target=\"_blank\">Why does the Disk Cleanup tool&#8217;s Windows Update Cleanup take so long and consume so much CPU? &#8211; The Old New Thing<\/a>.<\/div>\n<\/div>\n<h3>Additional Information<\/h3>\n<p>Optionally, to know the size of your component store and how much space can be reclaimed, run the following command before running the component cleanup.<\/p>\n<pre>Dism.exe \/Online \/Cleanup-Image \/AnalyzeComponentStore<\/pre>\n<p>The output shows the size of the component store and tells you if cleanup is recommended. For example, this command outputs details that look like the below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-49805\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/05\/component_store_cleanup_1.png\" alt=\"dism analyzecomponentstore\" width=\"750\" height=\"485\" \/><\/p>\n<p>It says the following:<\/p>\n<pre>Dism \/online \/cleanup-image \/analyzecomponentstore\r\n\r\nDeployment Image Servicing and Management tool\r\nVersion: 10.0.XXXX.0\r\n\r\nImage Version: 10.0.XXXX.0\r\n\r\n[==========================100.0%==========================]\r\n\r\nComponent Store (WinSxS) information:\r\n\r\nWindows Explorer Reported Size of Component Store : <strong>6.35 GB<\/strong>\r\n\r\nActual Size of Component Store : 6.00 GB\r\n\r\n    Shared with Windows : 3.11 GB\r\n    Backups and Disabled Features : 2.88 GB\r\n    Cache and Temporary Data : 1.54 MB\r\n\r\nDate of Last Cleanup : 2023-03-15 11:04:21\r\n\r\nNumber of Reclaimable Packages : <strong>2<\/strong>\r\nComponent Store Cleanup Recommended : <strong>Yes<\/strong>\r\n\r\nThe operation completed successfully.\r\n<\/pre>\n<p><em>The output is explained in the Microsoft article <a href=\"https:\/\/learn.microsoft.com\/en-us\/windows-hardware\/manufacture\/desktop\/determine-the-actual-size-of-the-winsxs-folder?view=windows-11\" rel=\"noopener\" target=\"_blank\">Determine the Actual Size of the WinSxS Folder<\/a>.<\/em><\/p>\n<p>It says that a component store cleanup is recommended. So, let&#8217;s run the command to cleanup the component store:<\/p>\n<pre>Dism.exe \/online \/Cleanup-Image \/StartComponentCleanup<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-49806\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/05\/component_store_cleanup_2.png\" alt=\"dism startcomponentcleanup\" width=\"750\" height=\"213\" \/><\/p>\n<p>To finally check how much disk space has been reclaimed, rerun the following command:<\/p>\n<pre>Dism.exe \/Online \/Cleanup-Image \/AnalyzeComponentStore<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-49807\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/05\/component_store_cleanup_3.png\" alt=\"dism analyzecomponentstore\" width=\"750\" height=\"491\" \/><\/p>\n<p>You can see from the screenshots that 1.43 GB of disk space has been reclaimed.<\/p>\n<h4>Editor&#8217;s note<\/h4>\n<p>The &#8220;<code>\/analyzecomponentstore<\/code>&#8221; command-line is <strong>not<\/strong> a prerequisite for running &#8220;<code>\/StartComponentCleanup<\/code>&#8220;. Run only &#8220;<code>\/StartComponentCleanup<\/code>&#8221; (if required) instead of both commands, to save your CPU resources and prevent unnecessary disk I\/O.<\/p>\n<p>As said earlier, these commands need not be run manually, as the Operating System runs the WinSxS cleanup anyway.<\/p>\n<p><em>To cleanup the WinSxS folder <strong>even more<\/strong>, the <code>\/ResetBase<\/code> command-line can be used with the above DISM command. The command removes all the superseded components; you won&#8217;t be able to install a recent update which can be a drawback in some cases. Use the <code>\/ResetBase<\/code> parameter only if the system is stable.<\/em><\/p>\n<p>For more information, see the Microsoft article <a href=\"https:\/\/learn.microsoft.com\/en-us\/windows-hardware\/manufacture\/desktop\/clean-up-the-winsxs-folder?view=windows-11\" target=\"_blank\" rel=\"noopener\">Clean Up the WinSxS Folder | Microsoft Learn<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Component Store or the WinSxS folder, located under the Windows folder, is used to support the functions needed to customize and update Windows.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[8,869],"tags":[106,155,160,964],"class_list":["post-49804","post","type-post","status-publish","format-standard","hentry","category-windows-10","category-windows-11","tag-command-prompt","tag-disk-cleanup","tag-dism","tag-servicing"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":5156,"url":"https:\/\/www.winhelponline.com\/blog\/disk-cleanup-3-99-tb-bug-windows-update-cleanup\/","url_meta":{"origin":49804,"position":0},"title":"Disk Cleanup Bug : 3.99 TB Used by Windows Updates [Fixed]","author":"Ramesh","date":"January 15, 2017","format":false,"excerpt":"After installing a Cumulative Update, when you run Disk Cleanup (cleanmgr.exe) as administrator to cleanup system files, it may incorrectly show 3.99 TB as being occupied by older versions of Windows Updates. This incorrect reporting happens because Disk Cleanup miscalculates the size of WinSxs folder, not taking the hard links\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"kb3194798 3.99 tb disk cleanup","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/10\/wu-cleanup-399tb-1.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":80286,"url":"https:\/\/www.winhelponline.com\/blog\/dism-error-1726-component-store-cleanup\/","url_meta":{"origin":49804,"position":1},"title":"DISM Error 1726 during Component Store Cleanup","author":"Ramesh","date":"February 20, 2026","format":false,"excerpt":"When you attempt to clean up the component store using the following DISM command on a Windows 11 24H2 or 25H2 system, the error code 1726 may occur. DISM \/Online \/Cleanup-Image \/StartComponentCleanup Deployment Image Servicing and Management tool Version: 10.0.26100.5074 Image Version: 10.0.26200.7462 [== 5.8% ] Error: 1726 The remote\u2026","rel":"","context":"In &quot;Windows 11&quot;","block_context":{"text":"Windows 11","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-11\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":57495,"url":"https:\/\/www.winhelponline.com\/blog\/dism-startcomponentcleanup-stops-20-percent\/","url_meta":{"origin":49804,"position":2},"title":"[Fix] DISM StartComponentCleanup Stops at 20%","author":"Ramesh","date":"July 2, 2023","format":false,"excerpt":"When you run a component store cleanup using DISM.exe's \/startcomponentcleanup parameter, the command doesn't finish correctly. The output shows that the process has stopped at 20%, but the message says, \"The operation completed successfully.\" You may wonder how to reclaim the disk space the component store uses. See also: How\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"DISM StartComponentCleanup stops at 20% or 70%","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/07\/dism-cleanup-stops-20-percent.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/07\/dism-cleanup-stops-20-percent.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/07\/dism-cleanup-stops-20-percent.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":74574,"url":"https:\/\/www.winhelponline.com\/blog\/windows-11-home-to-pro-0x80070490\/","url_meta":{"origin":49804,"position":3},"title":"[Fix] Windows 11 Home to Pro Upgrade Error 0x80070490","author":"Ramesh","date":"March 26, 2024","format":false,"excerpt":"Earlier, we saw how to upgrade Windows 11 Home Edition to Pro Edition. The Home to Pro upgrade can be purchased via the Microsoft Store app. However, some users encounter the error code 0x80070490 when upgrading from Home to Professional. We can't activate Windows on this device right now. You\u2026","rel":"","context":"In &quot;Windows 11&quot;","block_context":{"text":"Windows 11","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-11\/"},"img":{"alt_text":"windows 11 home to pro upgrade error 0x80070490","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2024\/03\/0x80070490-home-to-pro-upgrade-error-2.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2024\/03\/0x80070490-home-to-pro-upgrade-error-2.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2024\/03\/0x80070490-home-to-pro-upgrade-error-2.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":1848,"url":"https:\/\/www.winhelponline.com\/blog\/restore-defender-mpidletask-task-scheduler-deleted\/","url_meta":{"origin":49804,"position":4},"title":"Restore Windows Defender Scheduled Scan Task After Deleting it Accidentally","author":"Ramesh","date":"March 5, 2016","format":false,"excerpt":"Windows Defender's built-in scheduled task named \"Windows Defender Scheduled Scan\" is run by Automatic Maintenance when the system is idle. If you've deleted this task by mistake, this post tells you how to get it back in Windows 10. Use any one of the following methods. Restoring Windows Defender Scheduled\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/w10\/mpidletask-1.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":80040,"url":"https:\/\/www.winhelponline.com\/blog\/dism-error-1-incorrect-function\/","url_meta":{"origin":49804,"position":5},"title":"[Fix] DISM Error 1: Incorrect Function","author":"Ramesh","date":"December 22, 2025","format":false,"excerpt":"When you run the component store cleanup or install a Feature-On-Demand package using DISM, the error code 1 may appear. C:\\Windows\\System32>DISM \/Online \/Cleanup-Image \/StartComponentCleanup Deployment Image Servicing and Management tool Version: 10.0.26100.5074 Image Version: 10.0.26100.7171 [===========================70.0%======== ] Error: 1 Incorrect function. The DISM log file can be found at C:\\WINDOWS\\Logs\\DISM\\dism.log\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/49804","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/comments?post=49804"}],"version-history":[{"count":0,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/49804\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/media?parent=49804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/categories?post=49804"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/tags?post=49804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}