37

The answers provided to this question doesn't help.

I'ved tried

yum install ncdu

But I'm getting

No package ncdu available
1

5 Answers 5

29

You will need to download the latest ncdu package from http://dev.yorhel.nl/ncdu with wget.

Navigate to a directory with write access, such as your home directory.

wget https://dev.yorhel.nl/download/ncdu-1.13.tar.gz

then extract the tarball, with:

tar -xzvf ncdu-1.13.tar.gz

this will create a new folder named ncdu-1.13. Enter that folder and execute:

./configure --prefix=/usr

If it can't find ncurses.h and the configure fails,

checking for ncurses.h... no
configure: error: required header file not found

you'll have to install curses library headers

sudo dnf install ncurses ncurses-devel

After installing the library, execute the configure step again.

Then run,

make

and

sudo make install

and you are done.

You can optionally remove the ncdu-1.13.tar.gz file and the directory where the source files were extracted as you don't need them anymore.

5
  • // , Doesn't this require other dependencies? Nov 26, 2015 at 5:44
  • // , Also, I get the following error when I attempt ./configure: [nbasanese@rhel022 ncdu-1.11]$ ./configure –-prefix='/usr' configure: error: invalid variable name: '–-prefix' Nov 26, 2015 at 5:51
  • 1
    @Nathan Just use one dash before prefix. Didn't run into any other dependencies aside from curses.
    – M M
    May 4, 2016 at 20:56
  • 1
    sudo apt install libncurses5-dev on debian/ubuntu (using APT)
    – B. Shea
    Sep 21, 2017 at 16:04
  • On Oracle Linux (version 7, anyway), the dnf package manager does not exist, so use sudo yum install ncurses ncurses-devel for that step. Sep 30, 2020 at 18:36
15

If you are using Red Hat Enterprise Linux, I do not think ncdu is in the RHEL server repositories. I do not have a machine where I can check if it is in the workstation repositories, but I suspect it isn't. If it isn't, one option is the use EPEL (faq):

EPEL (Extra Packages for Enterprise Linux) is a volunteer-based community effort from the Fedora project to create a repository of high-quality add-on packages that complement the Fedora-based Red Hat Enterprise Linux (RHEL) and its compatible spinoffs, such as CentOS and Scientific Linux.

ncdu does seem to be in the EPEL repositories intended to work with RHEL 4 and RHEL 5. Directions for how to use these repositories can be found here:

http://fedoraproject.org/wiki/EPEL/FAQ#How_can_I_install_the_packages_from_the_EPEL_software_repository.3F

Alternatively, you can always download the tool from the upstream website:

http://dev.yorhel.nl/ncdu

and follow the directions in the INSTALL file. However, this will require you to chase down dependencies and install the tools needed to build the project.

12

First visit the below link and install the epel according to the OS type.

How to Install and Enable EPEL Repository on CentOS 8/7/6

Once the EPEL repo is installed, ncdu can be installed with following command:

yum install ncdu

Note: The above command will work if you have RHEL Subscription / Preconfigured with yum install.

To use ncdu, enter the following command:

ncdu
9

install epel repository

yum install epel-release

install ncdu

yum --enablerepo=epel install ncdu
1
  • Error: Unknown repo: 'epel'
    – HackSlash
    Jun 2 at 20:20
1

On Amazon Linux 2:

# amazon-linux-extras install epel
# yum install ncdu

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .