Disk C is full on an Azure VM

Schifter, Gabriela 255 Reputation points
2025-05-06T18:03:29.2433333+00:00

I have an Azure VM with a 256 GB OS disk (C:), but it shows as full even though I've calculated that only about 60 GB is being used. I already tried performing a disk cleanup, but it didn’t free up any space. What could be causing this issue?

Windows for business | Windows Server | User experience | Other
0 comments No comments

Answer accepted by question author
Henry Mai 8,230 Reputation points Independent Advisor
2025-05-07T09:56:40.5866667+00:00

Hi, I'm Henry! I will help you with this.

I see that your Azure VM's OS disk (C:) is reporting full capacity despite only using around 60 GB, and disk cleanup hasn’t resolved the issue. This can happen due to hidden system files, log files, or misreported disk usage.

  1. Check for Hidden Large Files
  • Open File Explorer, go to View > Show > Hidden items.
  • Look for large files in C:\Windows\Temp, C:\Users\YourUser\AppData\Local\Temp, or C:\Windows\Logs.
  • Use TreeSize Free or WinDirStat to visualize disk usage.
  1. Investigate Shadow Copies & System Restore
  • Open Command Prompt (Admin) and run: vssadmin list shadows
  • If shadow copies are consuming space, you can delete them using: vssadmin delete shadows /all
  1. Check Pagefile & Hibernation File
  • Run cmd as Administrator and check:
    • dir /a C:\pagefile.sys
    • dir /a C:\hiberfil.sys
  • If these files are large, disable hibernation with: powercfg -h off
  1. Verify Disk Usage with PowerShell
  • Run the following command to check actual disk usage: Get-PSDrive C
  1. Check Azure VM Diagnostics & Logs
  • Some Azure VMs generate excessive logs in C:\ProgramData\Microsoft\Diagnosis.
  • You can clear logs manually or configure log retention settings.
  1. Expand the OS Disk (If Needed)
  • If space is genuinely insufficient, consider expanding the disk using Azure’s disk resizing guide.

Let me know if any of these solutions work for you.

Was this answer helpful?


1 additional answer

Sort by: Most helpful
  1. MotoX80 37,861 Reputation points
    2025-05-06T21:34:40.7866667+00:00

    Use a tool like Treesize Free to analyze disk space usage. You may have hidden files.

    https://www.jam-software.com/treesize_free

    Was this answer helpful?

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.