How do I free up space when the C: drive is full?
Measure before deleting: TreeSize Free or WinDirStat run as administrator shows the tree by size in a minute. Then work the usual suspects in order: Windows.old and the update download cache, DISM /Online /Cleanup-Image /StartComponentCleanup for the component store, powercfg -h off for the hibernation file, the user's Downloads and Outlook OST, and vssadmin resize shadowstorage for restore points.
Never delete by hand inside WinSxS, C:\Windows\Installer or ProgramData\Package Cache, and never delete pagefile.sys or hiberfil.sys directly. On a server, a growing SQL transaction log wants log backups or simple recovery, not deletion. Then set a disk-space alert at 10 percent free so the next one is a ticket, not an outage.
A disk-space alert on C:, or a user who cannot save, cannot update, or cannot open Outlook because the drive is at 100%. The temptation is to start deleting; the right first move is to measure, because deleting on a guess breaks applications and leaves the real cause growing for another week.
TreeSize Free or WinDirStat shows the tree by size in about a minute. Run either as administrator, or the Windows and profile folders come out undercounted. For a quick top-level view from PowerShell:
Get-ChildItem C:\ -Directory -Force | ForEach-Object {
[pscustomobject]@{ Folder = $_.FullName
GB = [math]::Round((Get-ChildItem $_.FullName -Recurse -File -Force -ErrorAction SilentlyContinue | Measure-Object Length -Sum).Sum / 1GB, 1) }
} | Sort-Object GB -Descending
With numbers in front of you, the list below is in the order worth checking on a workstation.
Where does Windows Update leave its mess?
C:\Windows.old after a feature update is the single biggest find on many machines. Use Disk Cleanup > "Previous Windows installation(s)" or Settings > System > Storage > Temporary files to remove it. Clear C:\Windows\SoftwareDistribution\Download after stopping the wuauserv service.
Clean the component store (WinSxS) with DISM /Online /Cleanup-Image /StartComponentCleanup. Adding /ResetBase frees more space but makes installed updates impossible to uninstall, so only use it on a machine that is stable. Never delete inside WinSxS by hand.
Run cleanmgr as admin and tick everything except the things you specifically want to keep (Downloads, and the Recycle Bin if the user may need it). Turn on Storage Sense in Settings > System > Storage so temp files and the Recycle Bin get cleared on a schedule from now on.
What about the hibernation file and the page file?
C:\hiberfil.sys is roughly 40 percent of RAM by default and lives on C:. Run powercfg -h off to remove it and disable Fast Startup. This is fine on desktops; on a laptop the user loses hibernate, which most do not use.
C:\pagefile.sys is system managed and can grow large. Do not delete it. On a machine with plenty of RAM it can be capped or moved to another drive, but leaving it alone is usually the right call once the rest of the list has freed space.
Where does the user's profile hide space?
Downloads is the usual offender, followed by a Desktop full of ISOs. The Outlook OST under %LOCALAPPDATA%\Microsoft\Outlook can be tens of GB, and shrinks when you reduce "Mail to keep offline" in the account settings. Teams and browser caches under %LOCALAPPDATA% add up too.
For OneDrive, turn on Files On-Demand and free up space on the synced folders, or from a prompt run attrib +U -P /S on a folder to mark everything in it cloud-only.
Remove old profiles left behind after staff changes via System Properties > Advanced > User Profiles. Do not delete the folder directly, as this leaves registry entries behind and breaks the next logon for that account.
How much are shadow copies taking?
System Restore and some backup tools reserve space that no file browser shows. Run vssadmin list shadowstorage to see the reservation, then cap it:
vssadmin resize shadowstorage /for=C: /on=C: /maxsize=5%
That often gives back several gigabytes without touching a user file. Pick the percentage to match what the client needs for recovery.
What is different on a server?
The list changes. SQL Server transaction logs (.ldf) on a database in full recovery model that has never had a log backup grow forever, and the fix is proper log backups or switching to simple recovery, not deleting the file. IIS logs live under C:\inetpub\logs\LogFiles. WSUS content under C:\WSUS is cleaned with the Server Cleanup Wizard. Exchange logs on an on-prem box and DFS Replication staging both grow. And sometimes the C: partition was simply built too small: extend it in the hypervisor, then in Disk Management.
What should I never delete?
- Anything inside
C:\Windows\Installer,WinSxSorC:\ProgramData\Package Cache. They are needed to repair, patch and uninstall what is installed. pagefile.sysorhiberfil.sysby hand. Use the system settings orpowercfgto manage these files.- Other users' Recycle Bin contents, without asking.
Turning on NTFS compression for the system drive is not a fix.
How do I stop this ticket coming back?
A disk-space alert at 10 percent free (or a fixed number of GB on large disks) so the ticket arrives before the user cannot work. Storage Sense on. OneDrive Files On-Demand on. An Outlook offline window of 12 months rather than all mail. A minimum C: of 256 GB on new machines, because feature updates need 20 GB of headroom.
Moorfox raises a disk-space alert per volume so the tech sees the machine before the user does. The remote terminal runs the DISM, powercfg and vssadmin steps above without a session on the user's screen. Save the same cleanup script and run it across a group.
Frequently asked questions
Is it safe to delete Windows.old?
Yes, once you are sure the feature update is behaving. It exists so Windows can roll back, and deleting it removes that option. Use Disk Cleanup or Settings > System > Storage > Temporary files rather than deleting the folder by hand.
Can I delete hiberfil.sys?
Not by hand. Run powercfg -h off, which removes it and turns off Fast Startup as well. Fine on desktops; on a laptop the user loses hibernate, which most never use.
Why is C: full again a week later?
Because the cause was not found. Run TreeSize again and compare. It is usually an Outlook OST, a log file that is still growing, or a Downloads folder, and each of those has a specific fix rather than another round of temp-file cleanup.
How much free space does Windows need?
Feature updates want 20 GB or more of headroom. As a general rule keep 10 percent free, and alert at that point so the ticket arrives before the user cannot work.