Skip to main content
When the C: drive on Windows Server is full, first find what uses the space, then clean safely: run Dism.exe /online /Cleanup-Image /StartComponentCleanup to shrink the Windows component store, run Disk Cleanup (cleanmgr), and delete old IIS logs, memory dumps and application backups. Never delete files from C:\Windows\WinSxS by hand. If the disk was enlarged, extend C: with Resize-Partition.

Before you start

  • Run the commands in PowerShell as Administrator (or an elevated Command Prompt where shown).
  • Take a backup or snapshot before you delete anything you are unsure about.
  • A completely full C: drive can stop Windows from signing you in over RDP. Use the VNC console on a VPS.

How to see what fills the drive

Check free space:
List the largest folders in the root of C: (this can take a few minutes):
Run it again on the biggest folder (for example C:\Users or C:\inetpub) to drill down. A large C:\Windows folder is normal.

Cause 1: the Windows component store has grown (WinSxS)

After many updates, old component versions stay in C:\Windows\WinSxS. Check: in an elevated Command Prompt:
If the output says Component Store Cleanup Recommended : Yes, clean it. Fix:
This removes superseded components and is safe. For extra space, Microsoft also offers /ResetBase:
After /ResetBase, you can no longer uninstall the updates that are already installed. Only use it when the server is stable. Never delete files in C:\Windows\WinSxS manually: Microsoft warns this can stop Windows from booting or updating.

Cause 2: temporary files, update files and old logs

Fix: use Disk Cleanup. Choose what to clean once, then run it:
/sageset:1 opens Disk Cleanup Settings where you tick the categories (for example temporary files and Windows Update files). /sagerun:1 runs that selection on every drive. To clean only C: with default settings, run cleanmgr /d C. Also empty the Recycle Bin and clear the Downloads folders of user profiles under C:\Users.

Cause 3: IIS logs

If you run IIS, it writes logs to C:\inetpub\logs\LogFiles and doesn’t delete old ones on its own. Check: run the folder-size command on C:\inetpub\logs\LogFiles. Fix: delete logs older than 30 days:
Check the list, then run the command again without -WhatIf to delete. Add it to Task Scheduler to keep logs in check.

Cause 4: memory dumps after crashes

After a blue screen, Windows can write a full memory dump to C:\Windows\MEMORY.DMP, which can be as large as the server’s RAM. Fix: if you don’t need it for troubleshooting, delete it:
If the server crashes repeatedly, find the cause first with Event Viewer.

Cause 5: your own data

Database backups, game server backups, uploaded files and application logs are the most common reason a server fills up. Move them to another disk, delete old copies, or keep backups off the server: see back up a Windows server.

How to extend C: after adding storage

If you upgraded the disk size, Windows doesn’t use the new space until you extend the partition. On a VPS, see view and manage VPS storage.
Or open Disk Management (diskmgmt.msc), right-click C: and choose Extend Volume.

How to check it worked

Run Get-PSDrive -Name C again. Leave enough free space for the next cumulative update to download and install.

Frequently asked questions

What is the WinSxS folder?

It is the Windows component store, which Windows uses to install, update and repair system files. Shrink it only with the DISM commands above.

Is it safe to delete C:\Windows\Temp?

Use Disk Cleanup (cleanmgr) for temporary files instead of deleting them by hand.

Why is the drive full again after updates?

Each cumulative update adds new component versions. Run StartComponentCleanup after major updates, or let Windows run the scheduled task Microsoft\Windows\Servicing\StartComponentCleanup.

VPS and dedicated server guides

Every guide in this section.

Repair Windows with SFC and DISM

Fix a damaged component store.

Windows Update stuck or failing

Low space often breaks updates.

Back up a Windows server

Keep backups off C:.

VPS storage

Disks in the VPS panel.

Checked against Microsoft Learn: Clean up the WinSxS folder, Determine the size of the WinSxS folder, cleanmgr, Managing IIS log file storage and Resize-Partition on 4 November 2026. Commands were not tested on a live Windows server for this page.

Need Extra Help?

If you encounter any issues, our support team is ready to assist:

Save on Your Hosting

Ready to upgrade your hosting? Use code KB20 at checkout for 20% off your first order!

Last Updated: November 2026