> ## Documentation Index
> Fetch the complete documentation index at: https://help.freakhosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Windows Server C Drive Full? How to Free Up Disk Space

> Windows Server C drive full? Find the biggest folders, clean the component store with DISM, run Disk Cleanup, clear old logs and dumps, or extend C:.

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`.

| Difficulty | Time | Works on | Needs |
| - | - | - | - |
| Beginner to intermediate | 15 to 45 minutes | Windows Server 2019 / 2022 / 2025 | Administrator access |

## Before you start

* Run the commands in **PowerShell as Administrator** (or an elevated Command Prompt where shown).
* Take a [backup or snapshot](https://help.freakhosting.com/portals/vps-panel/how-to-schedule-and-restore-backups.md) 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](https://help.freakhosting.com/portals/vps-panel/how-to-enable-and-use-vnc-console-access.md) on a VPS.

## How to see what fills the drive

Check free space:

```powershell theme={null}
Get-PSDrive -Name C
```

List the largest folders in the root of C: (this can take a few minutes):

```powershell theme={null}
Get-ChildItem C:\ -Directory -Force -ErrorAction SilentlyContinue | ForEach-Object {
  $size = (Get-ChildItem $_.FullName -Recurse -File -Force -ErrorAction SilentlyContinue |
    Measure-Object -Property Length -Sum).Sum
  [PSCustomObject]@{ Folder = $_.FullName; SizeGB = [math]::Round($size / 1GB, 2) }
} | Sort-Object SizeGB -Descending | Select-Object -First 10
```

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:

```bat theme={null}
Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore
```

If the output says `Component Store Cleanup Recommended : Yes`, clean it.

**Fix:**

```bat theme={null}
Dism.exe /online /Cleanup-Image /StartComponentCleanup
```

This removes superseded components and is safe. For extra space, Microsoft also offers `/ResetBase`:

```bat theme={null}
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
```

> [!WARNING]
>
> 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:

```bat theme={null}
cleanmgr /sageset:1
cleanmgr /sagerun:1
```

`/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:

```powershell theme={null}
Get-ChildItem C:\inetpub\logs\LogFiles -Recurse -File -Filter *.log |
  Where-Object LastWriteTime -lt (Get-Date).AddDays(-30) |
  Remove-Item -WhatIf
```

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:

```powershell theme={null}
Remove-Item C:\Windows\MEMORY.DMP
```

If the server crashes repeatedly, find the cause first with [Event Viewer](https://help.freakhosting.com/portals/other/how-to-use-event-viewer-to-find-errors.md).

## 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](https://help.freakhosting.com/portals/other/how-to-back-up-a-windows-server.md).

## 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](https://help.freakhosting.com/portals/vps-panel/how-to-view-and-manage-vps-storage.md).

```powershell theme={null}
$max = (Get-PartitionSupportedSize -DriveLetter C).SizeMax
Resize-Partition -DriveLetter C -Size $max
```

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**.

## Related guides

> [card] [VPS and dedicated server guides](https://help.freakhosting.com/portals/other/vps-and-dedicated-server-guides.md)
>
> Every guide in this section.

> [card] [Repair Windows with SFC and DISM](https://help.freakhosting.com/portals/other/how-to-repair-windows-with-sfc-and-dism.md)
>
> Fix a damaged component store.

> [card] [Windows Update stuck or failing](https://help.freakhosting.com/portals/other/how-to-fix-windows-update-stuck-or-failing.md)
>
> Low space often breaks updates.

> [card] [Back up a Windows server](https://help.freakhosting.com/portals/other/how-to-back-up-a-windows-server.md)
>
> Keep backups off C:.

> [card] [VPS storage](https://help.freakhosting.com/portals/vps-panel/how-to-view-and-manage-vps-storage.md)
>
> Disks in the VPS panel.

***

> [!NOTE]
>
> **Checked against [Microsoft Learn: Clean up the WinSxS folder](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/clean-up-the-winsxs-folder?view=windows-11), [Determine the size of the WinSxS folder](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/determine-the-actual-size-of-the-winsxs-folder?view=windows-11), [cleanmgr](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/cleanmgr), [Managing IIS log file storage](https://learn.microsoft.com/en-us/iis/manage/provisioning-and-managing-iis/managing-iis-log-file-storage) and [Resize-Partition](https://learn.microsoft.com/en-us/powershell/module/storage/resize-partition)** on 4 November 2026. Commands were not tested on a live Windows server for this page.

> [!NOTE]
>
> ### Need Extra Help?
>
> If you encounter any issues, our support team is ready to assist:
>
> * **Live Chat:** Quick assistance via our website.
> * **Support Ticket:** [Open a Ticket](https://freakhosting.com/clientarea/submitticket.php)
> * **Discord:** [Join our Community](https://discord.gg/freakhosting)
> * **Email:** [support@freakhosting.com](mailto:support@freakhosting.com)

> [!TIP]
>
> ### Save on Your Hosting
>
> Ready to upgrade your hosting? Use code **KB20** at checkout for **20% off** your first order!

***

**Last Updated:** November 2026


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.