Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to analyze disk usage using ncdu

📅 2013-Jun-21 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ baobab, disk usage, ncdu, ubuntu ⬩ 📚 Archive

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


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧