How to Check Disk Usage on Raspberry Pi from the Terminal (SSH)

In this very short article I will show you how to check disk usage from the terminal on your Raspberry Pi.

To do this we will use a tool already available on the Raspberry Pi called ncdu (ncurses disk usage).
Its name refers to the better-known du utility. Unlike the latter, however, ncdu has a TUI (Terminal User Interface) that uses the ncurses library. You can navigate the list using the arrow keys and delete files that take up too much space by pressing the d key. Since version 1.09, disk usage data can be exported in JSON format.
ncdu was developed by Yoran Heling as a tool for analysing disk space on remote systems via SSH.

To check the space used on your Raspberry Pi’s root (SD card), simply connect via SSH and run the following command:

sudo ncdu /

Enjoy

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top