How to Monitor Disk Usage with ncdu

When your computer’s disk is almost full, things slow down. Programs don’t run as fast, updates may fail, and you might even get weird errors. That’s why keeping an eye on your disk usage is a smart habit. One tool that makes this super easy is called ncdu.

ncdu stands for NCurses Disk Usage. It’s a small, simple program that helps you see which folders and files are taking up the most space. I use it on my Linux server and also on my home machine when I want to clean things up. It’s kind of like a flashlight in a messy closet. You turn it on, and suddenly everything hiding in the corners becomes visible.


What Is ncdu?

Let’s break it down:

  • ncurses is a library that helps programs show stuff in the terminal in a nicer way.
  • du stands for “disk usage,” which is a built-in Linux command.
  • So, ncdu is a friendlier version of the du command.

Instead of reading long, hard-to-read numbers like du gives you, ncdu gives you a clean, interactive list you can move through.

When I first found ncdu, I was trying to figure out why my server was out of space. I used du, but the output made my eyes hurt. Then I installed ncdu, and boom—it was like switching from a black-and-white photo to full color.


Why Monitor Disk Usage?

It’s easy to forget how much space things take up—until suddenly you’re out of room. Some reasons you should keep an eye on your disk:

  • Old files pile up
  • Backups can get too big
  • Log files may grow like weeds
  • Unused apps take space
  • Cached data gets forgotten

If you’ve ever wondered, “Where did all my space go?”—ncdu has your back.


What You’ll Need

To follow this guide, you’ll need:

  • A computer running Linux, macOS, or WSL on Windows
  • A terminal or command line
  • A few minutes and a curious mind

You don’t need to be a command-line expert. If you can type and read, you’re ready.


Step 1: Install ncdu

Let’s get it installed. Here’s how, based on your system:

Debian/Ubuntu:

sudo apt install ncdu

Fedora/CentOS/RHEL:

sudo dnf install ncdu

Arch Linux:

sudo pacman -S ncdu

macOS (with Homebrew):

brew install ncdu

Once that’s done, just type:

ncdu

You’ll see it start scanning your current folder.


Step 2: Scan Your Disk

You can run ncdu in any folder to see what’s taking up space there.

For example:

ncdu /

This will scan your whole system. It might take a minute or two. You’ll see a loading bar while it works.

I like to run it like this when I don’t know where the problem is. If I already know I’m suspicious of the /var folder, I’ll do:

ncdu /var

This saves time and gives faster results.


Step 3: Explore the Results

Once it’s done scanning, you’ll see a list of folders and their sizes.

Here’s the fun part:

  • Use the arrow keys to move up and down
  • Press Enter to go into a folder
  • Use the left arrow to go back
  • Press q to quit

Each item shows the size, in human-readable form (like 1.3G for 1.3 gigabytes). The biggest folders are usually at the top, so you can spot the space hogs right away.

For example, I once found an old project backup that was 8 GB. I didn’t even need it anymore. Thanks to ncdu, I deleted it and instantly had room again.


Step 4: Delete Files (Carefully)

ncdu also lets you delete things right from the screen. Just press d on the selected file or folder.

But be careful. There’s no trash bin or undo button. Once you delete it, it’s gone.

That’s why I usually take note of the large files first. Then I quit ncdu and manually delete them, just to be safe.


Three Types of Files That Often Take Up Too Much Space

  • Old backups – Files you created months ago and forgot about
  • Crash logs – Files from programs that failed
  • Temporary files – Stuff in /tmp or cache folders

Look out for these space vampires. They like to lurk where you least expect them.


Step 5: Check Other Users’ Folders

If you have more than one user on your computer, check their folders too. You can run:

sudo ncdu /home

This will scan all user directories. You might find one user has a Downloads folder bigger than the rest of the system.

Once, I found a 30GB Steam game installer in /home/olduser/Downloads. That thing was just chilling there like it owned the place.


Benefits of Using ncdu

Here’s why I keep coming back to this little tool:

  • It’s fast and lightweight
  • Easy to understand, even for beginners
  • Runs in the terminal—no need for a GUI
  • Works great on remote servers over SSH
  • You can delete files right inside it

Compared to graphical tools, ncdu is like the quiet kid in class who actually knows all the answers.


Three Good Habits When Using ncdu

  • Check regularly – Once a week is a good rhythm
  • Scan specific folders – Saves time and helps you focus
  • Keep notes – If you find something big but don’t delete it, write it down

Good habits can help you avoid those “why is my disk full again?” moments.


Comparison: ncdu vs Other Tools

Here’s how ncdu stacks up:

Tool Interface Easy to Use Speed Can Delete Files
du Text only Hard Fast No
GUI apps Graphical Medium Slower Yes
ncdu Interactive CLI Very easy Fast Yes

I like GUI tools too, but sometimes I don’t want to open a whole desktop session just to clean up a few folders.


Extra Tips

  • You can exclude folders with the --exclude option
  • Use ncdu -x / to stay on the same filesystem
  • Combine with cron if you want regular reports

There’s more under the hood, but these basics will take you far.


Final Thoughts

If you’ve ever run out of disk space at the worst possible time, you know how annoying it can be. With ncdu, you don’t have to guess where the problem is hiding. You can see it clearly, clean it up quickly, and keep your system running smooth.

It’s like a diet plan for your hard drive—less clutter, more room, and better performance.

So, have you tried cleaning up your disk lately? What sneaky files did you find hiding in the shadows?

Leave a Reply