Check Disk Space Usage Using ncdu on Raspberry Pi

Check Disk Space Usage Using ncdu on Raspberry Pi

The ncdu is a command line tool that enables to view and analyze disk space usage. This tool shows the disk space used by individual directories.

By default, ncdu is already installed on Raspberry Pi OS. If ncdu is not available on the system then install it using the following commands:

sudo apt update
sudo apt install -y ncdu

We can check the current version of ncdu with command:

ncdu -v

Now simply type the ncdu command to see disk space usage in the current working directory:


Use the arrow keys to navigate the list. Files and directories can be deleted by pressing the d key. Press q key to quit ncdu.

We can also check disk space usage of a particular directory by specifying its path as argument. For example, analyze root directory with command:

sudo ncdu /
Disk Space Usage of root Directory Using ncdu

If you want to completely remove ncdu, execute the following command:

sudo apt purge --autoremove -y ncdu

Leave a Comment

Cancel reply

Your email address will not be published.