How to check disk space and find what is filling it
Use df, du, ncdu and PowerShell to see free disk space and track down the directories and files consuming it.
Beginner · about 5 min · Linux, Windows, macOS
A full disk breaks logging, databases and deploys. Diagnosis is always the same two-step: check which filesystem is full, then walk down the tree to find the directory responsible.
What this guide covers
- Linux: how full is each filesystem
- Linux: find the heavy directories
- Linux: find individual large files
- Windows: free space per drive
- Windows: biggest files in a tree
Common pitfalls covered
- df says full but du disagrees: a deleted file is still held open by a process — find it with ….
- Running out of inodes also reports 'no space left on device'; check ….
- Never delete files under /var/lib or /proc to reclaim space — rotate logs and clear package caches instead.
Questions answered
- What is the difference between df and du?
- How do I clear disk space on a Linux server safely?
- Is there an interactive tool?
This is a limited preview. The full walkthrough, command syntax and copy-ready examples are available to signed-in users.