News
3 new Serverspace GPT API Language Models available now!
DF
May 18 2025
Updated May 18 2025

How to install ncdu on Ubuntu 22.04

Ubuntu

ncdu (NCurses Disk Usage) is an efficient and intuitive tool for analyzing disk space usage through the terminal. Unlike the traditional du command, ncdu offers a convenient text-based interface that simplifies navigation through directories, allows quick sorting of folders by occupied space, and visually highlights the "heaviest" files and directories.

This makes it easy and fast to identify where the main disk space consumption is concentrated on your server or computer. It is especially useful when you need to free up disk space, find large directories, or perform storage audits. Thanks to its lightweight and fast operation, ncdu is ideal for system administrators, developers, and users who need to manage disk resources efficiently without extra effort or using bulky graphical programs.

In this article, we will cover how to install and use ncdu on Ubuntu 22.04.

Step 1: Update the package list

Before installation, it is recommended to update the package information on your system. To do this, run:

sudo apt update

Step 2: Install ncdu

ncdu installation is done from Ubuntu’s standard repositories. Just run:

sudo apt install ncdu -y

The -y flag automatically confirms the installation.

Step 3: Run ncdu to analyze the disk

To analyze disk space usage in the current directory, simply run:

ncdu

If you want to check, for example, the root directory /, use:

sudo ncdu /

Using sudo allows you to gain permissions to view all files and folders.

Main features and controls

  • Navigation: up/down arrows — move through the list of directories and files.
  • Enter directory: Enter key.
  • Exit directory: Backspace key.
  • Delete file or folder: d key (be careful!).
  • Exit program: q key.

All in all

ncdu is an excellent tool for quick analysis and cleanup of disk space on a server or local machine running Ubuntu 22.04. Its simplicity and clarity make it an indispensable helper for system administrators and regular users alike.

Try installing and using ncdu to better understand what occupies space on your disk and manage your data storage more effectively.

Vote:
5 out of 5
Аverage rating : 5
Rated by: 1
1101 CT Amsterdam The Netherlands, Herikerbergweg 292
+31 20 262-58-98
700 300
ITGLOBAL.COM NL
700 300

You might also like...

We use cookies to make your experience on the Serverspace better. By continuing to browse our website, you agree to our
Use of Cookies and Privacy Policy.