How To Install k4dirstat on Ubuntu 22.04

In this tutorial we learn how to install k4dirstat on Ubuntu 22.04. k4dirstat is graphical disk usage display with cleanup facilities

Introduction

In this tutorial we learn how to install k4dirstat on Ubuntu 22.04.

What is k4dirstat

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.

There are three methods to install k4dirstat on Ubuntu 22.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install k4dirstat Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install k4dirstat using apt-get by running the following command:

sudo apt-get -y install k4dirstat

Install k4dirstat Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install k4dirstat using apt by running the following command:

sudo apt -y install k4dirstat

Install k4dirstat Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install k4dirstat using aptitude by running the following command:

sudo aptitude -y install k4dirstat

How To Uninstall k4dirstat on Ubuntu 22.04

To uninstall only the k4dirstat package we can use the following command:

sudo apt-get remove k4dirstat

Uninstall k4dirstat And Its Dependencies

To uninstall k4dirstat and its dependencies that are no longer needed by Ubuntu 22.04, we can use the command below:

sudo apt-get -y autoremove k4dirstat

Remove k4dirstat Configurations and Data

To remove k4dirstat configuration and data from Ubuntu 22.04 we can use the following command:

sudo apt-get -y purge k4dirstat

Remove k4dirstat configuration, data, and all of its dependencies

We can use the following command to remove k4dirstat configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge k4dirstat

References

Summary

In this tutorial we learn how to install k4dirstat package on Ubuntu 22.04 using different package management tools: apt, apt-get and aptitude.