Disk space is the silent killer of Windows VPS uptime. The C: drive fills up, IIS starts returning 500 errors, SQL Server refuses to grow its databases, RDP sessions become unresponsive — and the first warning is usually a frantic “disk full” alert at 3 a.m. On a VPS you cannot walk over and plug in a USB stick, and resizing a system drive usually means downtime. The good news: most Windows VPS servers waste 20–40% of their disk on files that are safe to remove. This guide shows where the space goes and how to reclaim it without breaking anything.
Storage pressure is also a plan-sizing question. Some providers ship Windows VPS plans with a single 40 GB system drive; others include a separate data disk for databases and logs. If you keep filling up, compare Windows VPS plans on our comparison table to see which ones offer larger system drives or attachable storage volumes.
Step 1 — Find out where the space actually went
Before deleting anything, measure. The fastest scan is pure PowerShell: walk the file system and report the biggest top-level folders:
Get-ChildItem C:\ -Directory -Force -ErrorAction SilentlyContinue | ForEach-Object {
$size = (Get-ChildItem $_.FullName -Recurse -Force -File -ErrorAction SilentlyContinue | Measure-Object Length -Sum).Sum
[PSCustomObject]@{ Folder = $_.FullName; SizeGB = [math]::Round($size/1GB, 2) }
} | Sort-Object SizeGB -Descending | Select-Object -First 10
This scan takes a few minutes on a busy server and can be slow on throttled virtual disks, so run it once and cache the output. On virtually every Windows VPS, the top offenders are the same: C:\Windows (WinSxS and the update cache), C:\Windows\Temp, user TEMP folders, IIS logs, and the pagefile.
Step 2 — The safe cleanup checklist
These targets are safe to clean on any Windows Server, in this order:
- Temporary files: C:\Windows\Temp and per-user %TEMP%. Files in use are locked and simply skipped.
- Windows Update cache: C:\Windows\SoftwareDistribution\Download, after stopping wuauserv.
- Old user profiles: profile data of departed users via the Disk Cleanup tool or Remove-CimInstance on Win32_UserProfile.
- CBS and setup logs: C:\Windows\Logs\CBS can reach gigabytes after servicing operations.
Stop-Service wuauserv -Force
Remove-Item C:\Windows\SoftwareDistribution\Download\* -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item C:\Windows\Temp\* -Recurse -Force -ErrorAction SilentlyContinue
Start-Service wuauserv
Step 3 — WinSxS: the component store
C:\Windows\WinSxS is the largest single folder on most servers — and the one you must never delete by hand, because it holds the components Windows needs to service and roll back updates. Shrink it with DISM instead:
Dism /Online /Cleanup-Image /AnalyzeComponentStore
Dism /Online /Cleanup-Image /StartComponentCleanup
Dism /Online /Cleanup-Image /StartComponentCleanup /ResetBase
Run AnalyzeComponentStore first to see how much is reclaimable. /ResetBase removes the previous versions of all components — do it after you are confident in the current patch level, because it also removes the ability to uninstall older updates. Expect 2–5 GB back on a server that has been patched for a year.
Step 4 — Pagefile and hibernation
Two hidden space hogs: the pagefile (pagefile.sys) and, on desktop SKUs, hiberfil.sys. On a VPS the pagefile matters — removing it entirely invites out-of-memory crashes. The right move is to cap it:
# Fixed-size pagefile instead of system-managed:
wmic computersystem set AutomaticManagedPagefile=False
wmic pagefileset where name="C:\pagefile.sys" set InitialSize=2048,MaximumSize=4096
# Desktop SKUs only — disable hibernation and delete hiberfil.sys:
powercfg /h off
If your workload fits in RAM, a fixed 2–4 GB pagefile is plenty and stops the file from growing to match your RAM size. powercfg /h off reclaims a file roughly equal to your RAM on desktop editions of Windows.
Step 5 — Keep it clean: move data off C:
The permanent fix is to stop putting data on the system drive. Move IIS logs to a data volume, relocate SQL Server data files, and redirect user TEMP:
# Redirect IIS logs to D:\Logs
Import-Module WebAdministration
Set-ItemProperty 'IIS:\Sites\Default Web Site' -Name logFile.directory -Value 'D:\Logs'
# Per-user TEMP redirection (registry)
reg add "HKCU\Environment" /v TEMP /t REG_EXPAND_SZ /d "D:\Temp" /f
# NTFS compression for log folders (logs compress extremely well)
compact.exe /c /i /s:D:\Logs
NTFS compression is worth it for logs and archives — the CPU cost is trivial and you typically reclaim 60–80% of those folders.
A real-world case
A client’s Windows VPS was rebooting itself nightly — the monitoring agent could not write its database because C: had 150 MB left. Reclaiming 3.1 GB via DISM and clearing temp folders bought time, but the real fix was moving SQL Server data files to the provider’s separate data disk. Two months later the drive still has 60% free.
If your provider does not give you a separate data disk, storage is a good reason to switch. Contabo Windows VPS plans are known for unusually large storage allotments, so databases and logs can live on a volume that never threatens the OS drive.
Bottom line
Disk cleanup is a repeatable maintenance task: measure with the PowerShell scan, clear temp and update cache, shrink WinSxS with DISM, cap the pagefile, and move data off C:. Run it monthly and you will almost never hit “disk full” again. When the numbers say the plan is simply too small, check the full specs and pricing on our comparison table and size up before the drive decides for you.


