How to analyze disk usage using ncdu

Baobab is an excellent tool to analyze disk usage on the desktop. If you prefer the commandline, a good alternative is ncdu, named for NCurses Disk Usage.

This tool can be installed easily using the package name ncdu:

$ sudo apt-get install ncdu

To find the disk usage at the current directory, just invoke ncdu. The space occupied by the current directory is shown at the bottom bar as Total disk usage. The main window shows a list of the subdirectories and the space they occupy. Use the j-k or up-down keys to move along this list and press Enter to analyze the disk usage of any subdirectory. This makes it easy to drill down to find the directory that is hogging disk space. To quit ncdu, press q.

Tried with: ncdu 1.8 and Ubuntu 12.04 LTS

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s