Informing the IBM Community


Yes, I am continuing my amazing journey with open source on the IBM i.

In this article I’ll be taking a look at another one of the open source utilities that has slipped under the covers…

This time it is NCurses Disk Usage, or NCDU from now on.

This is a disk storage utility, with a pleasant interface, that works well on our IBM i.

Yes, IBM has provided us with a couple of traditional commands to deal with disk storage, namely RTVDSKINF (Retrieve Disk Information) and PRTDSKINF (Print Disk Information). 

These commands were introduced to the Operating System in the early 90’s.  These commands, depending on the power of your Power server (LOL), take a considerable time to run.

NCDU is an alternative to those commands.  A friendly graphic interface for storage, which works just great for our tradional library structure as well as the IFS.

For reference, the website for NCDU can be found at

Installing NCDU

NCDU is installed on your IBM i by using yum.  From a shell session, run the command listed below.

yum install ncdu ncurses-terminfo

As with other open-source packages, you can install NCDU using Open-Source Package Management from ACS.  Here you can see, my ACS Open Source Package Management screen.  I have the NCDU package installed at version 1.16

Running NCDU

From a SSH shell session, just run NCDU.

If you like the pretty colours, start NCDU with the –color dark arguments/parameters.

It will initially scan the IFS from your Home directory (Set within your user profile).

Here we can see it scanning my home directory (/home/Andy).

Once it has finished scanning my home directory, the following screen is displayed.

How good is that!  Only a couple of minutes to scan my home directory to see which directories are hogging my disks.

We can then drill down into other directories, using the arrow keys, then press Enter, to get that directory details.

If you want to see the whole IFS run the command below.

Ncdu / –color dark

This will show all file systems, including QSYS.lib.  Drilling down there will give a visual representation of which libraries are holding the biggest objects.

This can be seen in the figure below.

Drilling down into my FormaServe library, shows the screen below.


Yes, I will mention man (the Manual utility) again!

Do you have the excellent man utility on your box, if not, why not!  Grab it from ACS Open-Source Package Management.

See my previous PowerWire article Where’s that manual gone?  for more details about man.

Using man, we can see the manual for NCDU.

man ncdu

Man is great in showing which arguments, or parameters, I can run within this utility.


Another great addition to the open source on IBM i catalogue.  Make use of these facilities, they are of great benefit.

All the examples I have written for this article, and previous ones, can be found on my open-source repository on GitHub, which can be found at

If you have any questions, either on this article, or anything else on the IBM i, use the comments below, or send me a message on twitter @AndyYouens

Andy Youens is an IBM i consultant/instructor at Milton Keynes, UK-based FormaServe Systems with over 40 years IBM midrange experience. 

IBM Champion 2021

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.


One response to “NCDU on IBM i”

  1. Eduardo Alberto Marco avatar
    Eduardo Alberto Marco

    the command is :
    If you like the pretty colours, start NCDU with the –color dark arguments/parameters.
    two hyphens (–)

Leave a Reply

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