How To Install trash-cli on AlmaLinux 8

In this tutorial we learn how to install trash-cli in AlmaLinux 8. trash-cli is Command line interface to the freedesktop.org trashcan

Introduction

In this tutorial we learn how to install trash-cli on AlmaLinux 8.

What is trash-cli

trash-cli provides a command line trash usable with GNOME, KDE, Xfce or any freedesktop.org compatible trash implementation. The command line interface is compatible with rm and you can use trash-put as an alias to rm.

We can use yum or dnf to install trash-cli on AlmaLinux 8. In this tutorial we discuss both methods but you only need to choose one of method to install trash-cli.

Install trash-cli on AlmaLinux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install trash-cli using dnf by running the following command:

sudo dnf -y install trash-cli

Install trash-cli on AlmaLinux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install trash-cli using yum by running the following command:

sudo yum -y install trash-cli

How To Uninstall trash-cli on AlmaLinux 8

To uninstall only the trash-cli package we can use the following command:

sudo dnf remove trash-cli

References

Summary

In this tutorial we learn how to install trash-cli on AlmaLinux 8 using yum and dnf.