{"id":729,"date":"2026-09-09T22:57:19","date_gmt":"2026-09-09T22:57:19","guid":{"rendered":"https:\/\/windows-vps.org\/blog\/?p=729"},"modified":"2026-09-16T22:06:21","modified_gmt":"2026-09-16T22:06:21","slug":"windows-server-disk-cleanup-vps","status":"publish","type":"post","link":"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-vps\/","title":{"rendered":"Windows Server Disk Cleanup on a VPS: WinSxS, IIS Logs, and Shadow Copies Explained"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Windows Server fills up a VPS disk far faster than most admins expect. A 100 GB system volume on a busy Windows VPS typically loses 20\u201340 GB per year to component store growth, IIS logs, Windows Update caches, and shadow copies. This guide walks through the exact folders that consume space, how to measure them safely, and which cleanup actions are reversible \u2014 because &#8220;delete everything in WinSxS&#8221; is the fastest way to break servicing on a production server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Measure First: Where the Space Actually Goes<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Never clean a drive you have not measured. Run these from an elevated PowerShell session. The first command gives you top-level folder sizes on the system drive in a few minutes on a typical VPS.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-ChildItem C:\\ -Directory -Force |\n  ForEach-Object {\n    $size = (Get-ChildItem $_.FullName -Recurse -File -Force -ErrorAction SilentlyContinue |\n             Measure-Object -Property Length -Sum).Sum\n    [PSCustomObject]@{ Folder = $_.FullName; GB = [math]::Round($size\/1GB,2) }\n  } | Sort-Object GB -Descending | Select-Object -First 15<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For the component store, which is usually the largest single consumer, use the dedicated analyzer instead of Explorer:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Dism.exe \/Online \/Cleanup-Image \/AnalyzeComponentStore<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-table\"><table>\n<thead><tr><th>Location<\/th><th>Typical size<\/th><th>Safe to clean?<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>C:\\Windows\\WinSxS<\/td><td>8\u201320 GB<\/td><td>Only via DISM \u2014 never manually<\/td><\/tr>\n<tr><td>C:\\Windows\\SoftwareDistribution\\Download<\/td><td>2\u201310 GB<\/td><td>Yes, after stopping wuauserv<\/td><\/tr>\n<tr><td>C:\\Windows\\Logs\\CBS<\/td><td>1\u20135 GB<\/td><td>Yes, .log and .cab files<\/td><\/tr>\n<tr><td>C:\\inetpub\\logs\\LogFiles<\/td><td>1\u201330 GB<\/td><td>Yes, archive or delete old W3C logs<\/td><\/tr>\n<tr><td>C:\\Windows\\Temp and %TEMP%<\/td><td>0.5\u20135 GB<\/td><td>Yes<\/td><\/tr>\n<tr><td>System Volume Information (shadow copies)<\/td><td>5\u201350 GB<\/td><td>Trim via vssadmin, keep at least one<\/td><\/tr>\n<tr><td>C:\\Windows\\Installer<\/td><td>2\u20138 GB<\/td><td>No \u2014 breaks uninstall\/repair<\/td><\/tr>\n<\/tbody>\n<\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Safe High-Value Cleanups, In Order<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Component store (WinSxS) via DISM<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The supported cleanup reclaims superseded components without touching the active ones. Expect 2\u20136 GB on a server that has taken a year of cumulative updates.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Dism.exe \/Online \/Cleanup-Image \/StartComponentCleanup \/ResetBase<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Caution: <code>\/ResetBase<\/code> makes all currently installed updates non-uninstallable. That is usually acceptable on a VPS where you would rebuild rather than roll back, but skip it if you are mid-way through validating a patch cycle.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Windows Update download cache<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>Stop-Service wuauserv, bits -Force\nRemove-Item C:\\Windows\\SoftwareDistribution\\Download\\* -Recurse -Force -ErrorAction SilentlyContinue\nStart-Service wuauserv, bits<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3. IIS and CBS logs with age-based retention<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Delete W3C logs older than 30 days\nGet-ChildItem C:\\inetpub\\logs\\LogFiles -Recurse -File -Filter *.log |\n  Where-Object LastWriteTime -lt (Get-Date).AddDays(-30) | Remove-Item -Force\n\n# Compress CBS logs instead of deleting them outright\nCompress-Archive -Path C:\\Windows\\Logs\\CBS\\CBS.log -DestinationPath C:\\Windows\\Logs\\CBS\\CBS-archive.zip -Force<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Better than deleting IIS logs is preventing unbounded growth at the source: in IIS Manager open the site&#8217;s <em>Logging<\/em> feature and set <em>Log File Rollover<\/em> to a schedule with a maximum file size, and disable logging entirely for healthy static sites. Our <a href=\"https:\/\/windows-vps.org\/blog\/iis-application-pool-recycling-best-practices\/\">IIS application pool recycling guide<\/a> covers the related housekeeping that keeps worker processes from leaking memory while you are at it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4. Shadow copy storage<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>vssadmin list shadowstorage\nvssadmin resize shadowstorage \/for=C: \/on=C: \/maxsize=10GB<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Volume Shadow Copy is the usual hidden culprit on VPS plans with snapshots enabled by the provider. Cap the storage and let older restore points age out naturally rather than deleting the whole shadow copy set, which would break application-consistent backups on SQL Server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Automate It With a Scheduled Maintenance Task<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Manual cleanup does not survive contact with a busy quarter. Register a monthly task that logs reclaimable space before and after, so you can prove the cleanup is working and catch runaway log growth early.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$action  = New-ScheduledTaskAction -Execute 'powershell.exe' `\n  -Argument '-NoProfile -Command \"Dism.exe \/Online \/Cleanup-Image \/StartComponentCleanup; Get-ChildItem C:\\inetpub\\logs\\LogFiles -Recurse -File | Where-Object LastWriteTime -lt (Get-Date).AddDays(-30) | Remove-Item -Force\"'\n$trigger = New-ScheduledTaskTrigger -Monthly -DaysOfMonth 1 -At 3am\nRegister-ScheduledTask -TaskName 'Monthly Disk Maintenance' -Action $action -Trigger $trigger `\n  -User 'SYSTEM' -RunLevel Highest<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">How Much Space You Actually Need on a VPS<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For planning purposes, size the system volume to include the OS baseline <em>plus<\/em> growth. The table below reflects what we see on real production Windows VPS instances.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table>\n<thead><tr><th>Windows Server role<\/th><th>Baseline OS<\/th><th>Recommended system volume<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>Core install, file\/app server<\/td><td>~12 GB<\/td><td>60 GB<\/td><\/tr>\n<tr><td>IIS + .NET hosting<\/td><td>~18 GB<\/td><td>80\u2013100 GB<\/td><\/tr>\n<tr><td>SQL Server Express + IIS<\/td><td>~25 GB<\/td><td>120 GB (separate data volume)<\/td><\/tr>\n<tr><td>RDS session host with profiles<\/td><td>~30 GB<\/td><td>150 GB+<\/td><\/tr>\n<\/tbody>\n<\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you are repeatedly cleaning to survive the month, the disk is undersized \u2014 not the OS. A Windows VPS from <a href=\"https:\/\/interserver.net\/r\/1067805?url=interserver.net\/vps\/windows-vps.html\" rel=\"noreferrer noopener sponsored\" target=\"_blank\">InterServer<\/a> starts at $0.01 for the first month with promo code <strong>TRYINTERSERVER<\/strong>, and their plans are price-locked, so scaling to a larger NVMe system volume does not mean a surprise renewal hike. Storage tiers are compared in detail in our <a href=\"https:\/\/windows-vps.org\/blog\/nvme-vs-ssd-vs-hdd-windows-vps\/\">NVMe vs SSD vs HDD guide<\/a>, and the <a href=\"https:\/\/windows-vps.org\/\">windows-vps.org<\/a> homepage lists current Windows plan specs side by side.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common Mistakes That Cost You a Rebuild<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Deleting WinSxS contents manually.<\/strong> Instantly breaks Windows Update and security servicing; the only fix is an in-place repair or rebuild.<\/li>\n<li><strong>Removing C:\\Windows\\Installer.<\/strong> Uninstalls and MSI repairs fail with &#8220;the feature you are trying to use is on a network resource that is unavailable&#8221;.<\/li>\n<li><strong>Using the Windows 10\/11 Storage Sense UI.<\/strong> It does not exist on Server SKUs and its absence tempts admins into unsupported third-party &#8220;cleaners&#8221; that strip ACLs.<\/li>\n<li><strong>Deleting all shadow copies.<\/strong> Breaks VSS-based backup chains and application-consistent SQL backups.<\/li>\n<li><strong>Never cleaning, then resizing the disk twice a year.<\/strong> Resizing costs downtime on most providers; a 20-minute monthly task does not.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Quick Reference Commands<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># Top 10 largest files on the system drive\nGet-ChildItem C:\\ -Recurse -File -Force -ErrorAction SilentlyContinue |\n  Sort-Object Length -Descending | Select-Object -First 10 FullName, @{n='GB';e={[math]::Round($_.Length\/1GB,2)}}\n\n# Check free space and warn threshold\nGet-PSDrive C | Select-Object Used, Free, @{n='FreeGB';e={[math]::Round($_.Free\/1GB,2)}}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Run the analyzer, do the four supported cleanups, automate them monthly, and right-size the volume once. That is the entire discipline \u2014 and it is the difference between a server you maintain and a server you rebuild.<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>Windows Server fills up a VPS disk far faster than most admins expect. A 100 GB system volume on a busy Windows VPS typically loses 20\u201340 GB per year to component store growth, IIS logs, Windows Update caches, and shadow copies. This guide walks through the exact folders that consume space, how to measure them &#8230; <a title=\"Windows Server Disk Cleanup on a VPS: WinSxS, IIS Logs, and Shadow Copies Explained\" class=\"read-more\" href=\"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-vps\/\" aria-label=\"Read more about Windows Server Disk Cleanup on a VPS: WinSxS, IIS Logs, and Shadow Copies Explained\">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":4,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-729","post","type-post","status-publish","format-standard","hentry","category-reviews"],"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 on a VPS: WinSxS, IIS Logs, and Shadow Copies Explained - 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-vps\/\" \/>\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 on a VPS: WinSxS, IIS Logs, and Shadow Copies Explained\" \/>\n<meta property=\"og:description\" content=\"Windows Server Disk Cleanup on a VPS: WinSxS, IIS Logs, and Shadow Copies Explained\" \/>\n<meta property=\"og:url\" content=\"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-vps\/\" \/>\n<meta property=\"og:site_name\" content=\"Windows VPS Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-09T22:57:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-09-16T22:06:21+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=\"5 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-vps\/\",\"url\":\"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-vps\/\",\"name\":\"Windows Server Disk Cleanup on a VPS: WinSxS, IIS Logs, and Shadow Copies Explained - Windows VPS Blog\",\"isPartOf\":{\"@id\":\"https:\/\/windows-vps.org\/blog\/#website\"},\"datePublished\":\"2026-09-09T22:57:19+00:00\",\"dateModified\":\"2026-09-16T22:06:21+00:00\",\"author\":{\"@id\":\"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58\"},\"breadcrumb\":{\"@id\":\"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-vps\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-vps\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-vps\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/windows-vps.org\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Windows Server Disk Cleanup on a VPS: WinSxS, IIS Logs, and Shadow Copies Explained\"}]},{\"@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 on a VPS: WinSxS, IIS Logs, and Shadow Copies Explained - 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-vps\/","og_locale":"en_US","og_type":"article","og_title":"Windows Server Disk Cleanup on a VPS: WinSxS, IIS Logs, and Shadow Copies Explained","og_description":"Windows Server Disk Cleanup on a VPS: WinSxS, IIS Logs, and Shadow Copies Explained","og_url":"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-vps\/","og_site_name":"Windows VPS Blog","article_published_time":"2026-09-09T22:57:19+00:00","article_modified_time":"2026-09-16T22:06:21+00:00","author":"windows-vps","twitter_card":"summary_large_image","twitter_misc":{"Written by":"windows-vps","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-vps\/","url":"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-vps\/","name":"Windows Server Disk Cleanup on a VPS: WinSxS, IIS Logs, and Shadow Copies Explained - Windows VPS Blog","isPartOf":{"@id":"https:\/\/windows-vps.org\/blog\/#website"},"datePublished":"2026-09-09T22:57:19+00:00","dateModified":"2026-09-16T22:06:21+00:00","author":{"@id":"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58"},"breadcrumb":{"@id":"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-vps\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-vps\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/windows-vps.org\/blog\/windows-server-disk-cleanup-vps\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/windows-vps.org\/blog\/"},{"@type":"ListItem","position":2,"name":"Windows Server Disk Cleanup on a VPS: WinSxS, IIS Logs, and Shadow Copies Explained"}]},{"@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\/729","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=729"}],"version-history":[{"count":2,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts\/729\/revisions"}],"predecessor-version":[{"id":759,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts\/729\/revisions\/759"}],"wp:attachment":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/media?parent=729"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/categories?post=729"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/tags?post=729"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}