{"id":645,"date":"2026-08-17T22:59:16","date_gmt":"2026-08-17T22:59:16","guid":{"rendered":"https:\/\/windows-vps.org\/blog\/?p=645"},"modified":"2026-08-17T22:59:16","modified_gmt":"2026-08-17T22:59:16","slug":"windows-server-disk-cleanup-winsxs-pagefile","status":"publish","type":"post","link":"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-winsxs-pagefile\/","title":{"rendered":"Windows Server Disk Cleanup: WinSxS, Page Files, and Temp Data Control"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">A Windows Server that runs out of disk does not fail gracefully. Services stop, the event log stops writing, Windows Update fails with 0x80070070, and backup jobs die silently. Reclaiming space on Windows Server is not about deleting random folders \u2014 it is about knowing which components are safe to shrink. The three big targets are the WinSxS component store, the page file, and temp data. If you are sizing a new box, our <a href=\"https:\/\/windows-vps.org\/#providers\">provider comparison table<\/a> will help you pick a disk size that matches your workload.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">WinSxS: The Component Store You Must Not Delete by Hand<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">WinSxS holds every version of every system binary Windows has ever installed, which is why it grows with every cumulative update and why deleting files inside it breaks servicing \u2014 future updates fail, and rollbacks become impossible. Two facts change how you treat it. First, much of WinSxS is hard links to files that also appear elsewhere, so the folder&#8217;s on-disk size overstates the real cost; check the actual reclaimable space with the analyzer:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DISM \/Online \/Cleanup-Image \/AnalyzeComponentStore<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Second, cleanup must go through DISM, never Explorer:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DISM \/Online \/Cleanup-Image \/StartComponentCleanup\nDISM \/Online \/Cleanup-Image \/StartComponentCleanup \/ResetBase<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>\/StartComponentCleanup<\/code> removes superseded component versions. <code>\/ResetBase<\/code> also drops the ability to uninstall the current update \u2014 run it only after you are confident in the patch level, and note it cannot be reverted. Run the plain cleanup after every major patch cycle; on a server that has accumulated a year of updates, expect several gigabytes back.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Page File and Hibernation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The page file is sized by default to a multiple of RAM, and on a VPS with 16 GB of RAM and plenty of free memory, the default can sit at 16-24 GB doing almost nothing. If the box has stable memory pressure, set a fixed size instead of system-managed. A common conservative choice is a fixed 4-8 GB page file on the system disk (or on a second disk if one exists), keeping the option for crash dumps alive:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wmic computersystem set AutomaticManagedPagefile=False\nwmic pagefileset where name=\"C:\\\\pagefile.sys\" set InitialSize=4096,MaximumSize=8192<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Monitor commit charge for a week before shrinking \u2014 if peak commit is close to physical RAM, leave the page file alone. Separately, hibernation is useless on a server, yet <code>hiberfil.sys<\/code> can consume up to 40% of RAM. Disable it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>powercfg \/h off<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Temp Data and Update Residue<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Temp data accumulates in three places: <code>C:\\Windows\\Temp<\/code>, per-user <code>%TEMP%<\/code> folders, and the Windows Update download cache at <code>C:\\Windows\\SoftwareDistribution\\Download<\/code>. The Update cache is safe to clear, but stop the service first so nothing is mid-download:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Stop-Service wuauserv -Force\nRemove-Item C:\\Windows\\SoftwareDistribution\\Download\\* -Recurse -Force\nStart-Service wuauserv<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For the rest, use the built-in Disk Cleanup with a saved settings profile rather than ad-hoc <code>Remove-Item<\/code> \u2014 it knows what is safe:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cleanmgr \/sageset:100   # tick the categories once, interactively\ncleanmgr \/sagerun:100<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Also watch <code>C:\\Windows\\Logs\\CBS<\/code> and <code>C:\\Windows\\Minidump<\/code>. CBS logs can reach hundreds of megabytes on servers with failed updates; the DISM cleanup above prunes them. Minidumps accumulate after every crash of a monitored process \u2014 investigate them, then delete them.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Windows.old and WinRE<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">An in-place upgrade or a failed upgrade attempt leaves <code>C:\\Windows.old<\/code>, which can be 10-30 GB. Remove it through Disk Cleanup (&#8220;Previous Windows installation&#8221;) rather than deleting the folder \u2014 the clean method also clears the rollback registration. WinRE (Windows Recovery Environment) is a separate partition that is normally a few hundred MB; it is worth leaving in place because it is the fastest path to recovery, and the space it costs is small compared to a broken boot.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Make It Automatic<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Disk hygiene is a maintenance routine, not a crisis activity. Two scheduled tasks cover most servers: a monthly task running <code>DISM \/StartComponentCleanup<\/code> after patch Tuesday, and a weekly task that reports free space so you see the trend before it becomes an outage:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-PSDrive C | Select-Object Used, Free\n# alert when free space drops below 10%:\nif ((Get-PSDrive C).Free -lt ((Get-PSDrive C).Used * 0.1)) {\n  Send-MailMessage -To \"ops@example.com\" -Subject \"Low disk on $env:COMPUTERNAME\" ...\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Pair the routine with a backup strategy that does not depend on spare disk space \u2014 for that, review the <a href=\"https:\/\/windows-vps.org\/#features\">Windows VPS feature overview<\/a>. And if your current disk is already too small for the workload, <a href=\"https:\/\/windows-vps.org\/#providers\" rel=\"noreferrer noopener sponsored\">compare Windows VPS plans with larger disks<\/a> before you hit the wall.<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>A Windows Server that runs out of disk does not fail gracefully. Services stop, the event log stops writing, Windows Update fails with 0x80070070, and backup jobs die silently. Reclaiming space on Windows Server is not about deleting random folders \u2014 it is about knowing which components are safe to shrink. The three big targets &#8230; <a title=\"Windows Server Disk Cleanup: WinSxS, Page Files, and Temp Data Control\" class=\"read-more\" href=\"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-winsxs-pagefile\/\" aria-label=\"Read more about Windows Server Disk Cleanup: WinSxS, Page Files, and Temp Data Control\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":2,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-645","post","type-post","status-publish","format-standard","hentry","category-tutorials-guides"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v26.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Windows Server Disk Cleanup: WinSxS, Page Files, and Temp Data Control - Windows VPS Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-winsxs-pagefile\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Windows Server Disk Cleanup: WinSxS, Page Files, and Temp Data Control\" \/>\n<meta property=\"og:description\" content=\"Windows Server Disk Cleanup: WinSxS, Page Files, and Temp Data Control\" \/>\n<meta property=\"og:url\" content=\"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-winsxs-pagefile\/\" \/>\n<meta property=\"og:site_name\" content=\"Windows VPS Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-17T22:59:16+00:00\" \/>\n<meta name=\"author\" content=\"windows-vps\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"windows-vps\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-winsxs-pagefile\/\",\"url\":\"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-winsxs-pagefile\/\",\"name\":\"Windows Server Disk Cleanup: WinSxS, Page Files, and Temp Data Control - Windows VPS Blog\",\"isPartOf\":{\"@id\":\"https:\/\/windows-vps.org\/blog\/#website\"},\"datePublished\":\"2026-08-17T22:59:16+00:00\",\"author\":{\"@id\":\"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58\"},\"breadcrumb\":{\"@id\":\"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-winsxs-pagefile\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-winsxs-pagefile\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-winsxs-pagefile\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/windows-vps.org\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Windows Server Disk Cleanup: WinSxS, Page Files, and Temp Data Control\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/windows-vps.org\/blog\/#website\",\"url\":\"https:\/\/windows-vps.org\/blog\/\",\"name\":\"Windows VPS Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/windows-vps.org\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58\",\"name\":\"windows-vps\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3f2573db5afcd1a6ab9abcc5d48fc8e42584bc87ab9d98cc156e5b2097766dd9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3f2573db5afcd1a6ab9abcc5d48fc8e42584bc87ab9d98cc156e5b2097766dd9?s=96&d=mm&r=g\",\"caption\":\"windows-vps\"},\"sameAs\":[\"https:\/\/windows-vps.org\/blog\"],\"url\":\"https:\/\/windows-vps.org\/blog\/author\/myxiechengxuan\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Windows Server Disk Cleanup: WinSxS, Page Files, and Temp Data Control - Windows VPS Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-winsxs-pagefile\/","og_locale":"en_US","og_type":"article","og_title":"Windows Server Disk Cleanup: WinSxS, Page Files, and Temp Data Control","og_description":"Windows Server Disk Cleanup: WinSxS, Page Files, and Temp Data Control","og_url":"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-winsxs-pagefile\/","og_site_name":"Windows VPS Blog","article_published_time":"2026-08-17T22:59:16+00:00","author":"windows-vps","twitter_card":"summary_large_image","twitter_misc":{"Written by":"windows-vps","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-winsxs-pagefile\/","url":"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-winsxs-pagefile\/","name":"Windows Server Disk Cleanup: WinSxS, Page Files, and Temp Data Control - Windows VPS Blog","isPartOf":{"@id":"https:\/\/windows-vps.org\/blog\/#website"},"datePublished":"2026-08-17T22:59:16+00:00","author":{"@id":"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58"},"breadcrumb":{"@id":"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-winsxs-pagefile\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-winsxs-pagefile\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-winsxs-pagefile\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/windows-vps.org\/blog\/"},{"@type":"ListItem","position":2,"name":"Windows Server Disk Cleanup: WinSxS, Page Files, and Temp Data Control"}]},{"@type":"WebSite","@id":"https:\/\/windows-vps.org\/blog\/#website","url":"https:\/\/windows-vps.org\/blog\/","name":"Windows VPS Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/windows-vps.org\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58","name":"windows-vps","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3f2573db5afcd1a6ab9abcc5d48fc8e42584bc87ab9d98cc156e5b2097766dd9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3f2573db5afcd1a6ab9abcc5d48fc8e42584bc87ab9d98cc156e5b2097766dd9?s=96&d=mm&r=g","caption":"windows-vps"},"sameAs":["https:\/\/windows-vps.org\/blog"],"url":"https:\/\/windows-vps.org\/blog\/author\/myxiechengxuan\/"}]}},"_links":{"self":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts\/645","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/comments?post=645"}],"version-history":[{"count":1,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts\/645\/revisions"}],"predecessor-version":[{"id":647,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts\/645\/revisions\/647"}],"wp:attachment":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/media?parent=645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/categories?post=645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/tags?post=645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}