k4dirstat command not found

In this troubleshooting guide we learn how to fix k4dirstat command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

k4dirstat: command not found

or when using sudo you get the following error message

sudo: k4dirstat: command not found

Solutions to k4dirstat: command not found

How To Fix k4dirstat: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu k4dirstat is provided by k4dirstat package.

k4dirstat is:

K4DirStat (KDE Directory Statistics) is a small utility program that sums up disk usage for directory trees, very much like the Unix ‘du’ command. It displays the disk space used up by a directory tree, both numerically and graphically. It is network transparent (i.e., you can use it to sum up FTP servers), and comes with predefined and user configurable cleanup actions. You can directly open a directory branch in Konqueror or the shell of your choice, compress it to a .tar.bz2 archive, or define your own cleanup actions.

To fix this problem, we can install more using the command below.

sudo apt-get -y install k4dirstat

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install k4dirstat.

sudo apt -y install k4dirstat

Or if you have aptitude installed you can use the following command.

sudo aptitude install k4dirstat

Summary

In this tutorial we learn how to fix k4dirstat command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.