All Products
Search
Document Center

:Troubleshoot Drive C disk space loss on a Windows instance

Last Updated:Apr 15, 2026

Identify and resolve common causes of Drive C disk space loss on a Windows ECS instance.

Symptom

Drive C on a Windows ECS instance is running out of space, causing the operating system to malfunction.

Quick reference

Click a cause to jump to its solution.

Cause

Key indicator

Recommended solution

System logs

Large files in C:\Windows\Logs\CBS

Run DISM.exe /Online /Cleanup-Image /SPSuperseded

Temporary files

Large files in C:\windows\temp or %USERPROFILE%\AppData\Local\Temp

Run del /S /Q %TEMP%\*

Windows system updates

Large C:\windows\WinSxS directory

Run DISM.exe /Online /Cleanup-Image /StartComponentCleanup

Virtual memory allocation

Virtual memory configured on Drive C

Reconfigure virtual memory settings

Before you begin

Back up important data on Drive C before performing any cleanup to prevent accidental data loss.

Cause 1: System logs consume excessive disk space

Windows stores logs from Windows Update, DISM repairs, and other system operations in C:\Windows\Logs\CBS. Without regular cleanup, these logs can consume significant disk space.

Solution

Use one of the following methods to free up disk space consumed by system logs.

Method 1: Use DISM.exe to clean up log files

Run the following command in an elevated Command Prompt to clean up obsolete log files:

DISM.exe /Online /Cleanup-Image /SPSuperseded

Method 2: Manually delete system log files

Important

Back up system log files before manual deletion. Improper deletion may cause system instability.

Cause 2: Temporary files consume excessive disk space

Windows creates temporary files during OS and application operations, typically stored in C:\windows\temp or %USERPROFILE%\AppData\Local\Temp.

Solution

Use one of the following methods to free up disk space consumed by temporary files.

Method 1: Run a command to delete temporary files

Run the following command in an elevated Command Prompt:

del /S /Q %TEMP%\*

Method 2: Manually delete temporary files

Navigate to C:\windows\temp or %USERPROFILE%\AppData\Local\Temp and delete unneeded temporary files.

Cause 3: Windows system updates consume excessive disk space

Windows downloads updates and patches to C:\windows\WinSxS and backs up old versions. Without cleanup, these files accumulate and consume excessive disk space.

Important

Do not manually delete files in the WinSxS folder. Doing so may damage your system, prevent booting, or break applications.

Solution

Use one of the following methods to free up disk space consumed by Windows updates.

Method 1: Use DISM.exe to clean up the WinSxS folder

Run the following command in an elevated Command Prompt to clean up obsolete Windows Update files:

DISM.exe /Online /Cleanup-Image /StartComponentCleanup

Method 2: Use the Disk Cleanup tool

Use the Disk Cleanup tool to clean up Drive C.

Cause 4: Virtual memory consumes Drive C disk space

When physical memory is insufficient, Windows uses disk space as virtual memory. If virtual memory is configured on Drive C, the pagefile reduces the available disk space.

Solution

Verify the virtual memory configuration and adjust if needed. How do I configure the virtual memory of a Windows instance?

References

Use tools such as WinDirStat and SpaceSniffer to analyze disk usage, identify large directories, and drill down into specific files.