Stop blindly deleting files when your disk is near 100 percent

Disk & Filesystem Management (Du/Df/Lsblk/Fstrim)

Stop blindly deleting files when your disk is near 100 percent

🧩 The Challenge

Everyone hits that panic moment where a server goes read-only because the root partition hit zero bytes left. You start frantically hunting for big files, but running du on the whole tree takes forever and usually masks the real culprits.

💡 The Fix

Stop guessing where the space went and use ncdu to get an interactive, ncurses-based view of your directories. It’s way faster to navigate and lets you delete garbage right inside the interface without jumping back and forth to your terminal prompt.

ncdu /

⚙️ Why It Works

By building a scan of the entire filesystem structure in memory, it provides a sorted list of directories by size, letting you drill down into bloated log directories or old backups in seconds. That constant jumping back and forth between ls and du is just a relic of the past that nobody needs to live with anymore.

🚀 Pro-Tip: Use the -x flag to keep the scan on the same filesystem and avoid wandering off into mounted network shares or virtual filesystems that will ruin your day.

Linux Tips & Tricks | © ngelinux.com | 8/30/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted