Guide · Windows Server

Why does the C: drive fill up on a Windows server?

A Windows server with a full C: drive slows down, cannot install updates, may stop services and can eventually stop working. This guide covers the most common reasons the C: drive fills up, how to find what is taking the space, and what you can safely clean up and what you must never touch.

Doz Teknoloji · Updated November 21, 2026 · 7 min read

Find it first: what is using the space?

Instead of deleting files on a hunch, find the large folders first. In PowerShell run as administrator, this command sorts the folders at the root of C: by size (it can take a few minutes on large disks):

Get-ChildItem C:\ -Directory -Force -ErrorAction SilentlyContinue | ForEach-Object { $s = (Get-ChildItem $_.FullName -Recurse -Force -File -ErrorAction SilentlyContinue | Measure-Object Length -Sum).Sum; [pscustomobject]@{ Folder = $_.FullName; GB = [math]::Round($s / 1GB, 1) } } | Sort-Object GB -Descending | Select-Object -First 15

Go into the largest folder and run the same command for it to work your way down. Large files at the root, such as pagefile.sys and hiberfil.sys, are listed by Get-ChildItem C:\ -Force -File.

The most common causes

Safe cleanup

  1. Clean up the component store. First see how much you would gain: Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore. Then remove old components: Dism.exe /Online /Cleanup-Image /StartComponentCleanup. It can take a while; run it outside working hours.
  2. Use Disk Cleanup. On installations with the Desktop Experience, "Clean up system files" in cleanmgr safely removes Windows Update leftovers and temporary files.
  3. Delete IIS logs regularly. Set up a scheduled task that deletes logs older than a given number of days, or move the log folder to another disk. Set the retention to match your company's log retention rules.
  4. Delete old memory dumps. Once the cause of a crash has been examined, old dump files can go.
  5. Remove unused profiles. Delete the profiles of users who have left from System Properties › User Profiles; do not delete the folders by hand.
  6. Move growing data. Databases, backups and shared files belong on a separate data disk, not on C:. Moving SQL Server files needs planning; do it in a maintenance window.
  7. Extend the disk if needed. On virtual servers, extending C: is often the quickest way out. But extending it without fixing why it fills up only delays the problem.

Never delete by hand

Prevent it from the start

When you install a new server, keep C: for the operating system and programs only. Put databases, backups, shared files and web logs on a separate data disk, and point the applications to it at installation. Give C: enough room for updates and growth; extending it later is not always possible. On virtual servers, separate data disks also make backup and migration easier.

Hear about it before it fills up

The best cleanup is the one done before the disk is full. Secura RMM watches the free space of every disk: it sends a warning when free space drops below 10%, and a critical alert below 5%; you can change the thresholds. The disk capacity and growth report shows which disk is filling and how fast. The agent only reads and reports; it never deletes a file. See alerts for details.

Frequently asked questions

Can I delete the WinSxS folder?

No. Shrink the WinSxS folder only with Dism.exe /Online /Cleanup-Image /StartComponentCleanup or with Disk Cleanup.

How much free space should C: have?

There is no fixed number, but leaving at least 10–15% and a few tens of GB free for updates and temporary files is a good start.

I cleaned the disk but it filled up again a few weeks later. Why?

Something is growing: usually log files, a database or backups. Compare the large folders a few weeks apart to find which one grows.

Related: Alerts · Windows server monitoring · SQL Server monitoring