How To Install trash-cli on Rocky Linux 8

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

Introduction

In this tutorial we learn how to install trash-cli on Rocky Linux 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 Rocky Linux 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 Rocky Linux 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 Rocky Linux 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 Rocky Linux 8

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

sudo dnf remove trash-cli

trash-cli Package Contents on Rocky Linux 8

/usr/bin/trash
/usr/bin/trash-empty
/usr/bin/trash-list
/usr/bin/trash-put
/usr/bin/trash-restore
/usr/bin/trash-rm
/usr/lib/python3.6/site-packages/trash_cli-0.21.4.18-py3.6.egg-info
/usr/lib/python3.6/site-packages/trash_cli-0.21.4.18-py3.6.egg-info/PKG-INFO
/usr/lib/python3.6/site-packages/trash_cli-0.21.4.18-py3.6.egg-info/SOURCES.txt
/usr/lib/python3.6/site-packages/trash_cli-0.21.4.18-py3.6.egg-info/dependency_links.txt
/usr/lib/python3.6/site-packages/trash_cli-0.21.4.18-py3.6.egg-info/requires.txt
/usr/lib/python3.6/site-packages/trash_cli-0.21.4.18-py3.6.egg-info/top_level.txt
/usr/lib/python3.6/site-packages/trashcli
/usr/lib/python3.6/site-packages/trashcli/__init__.py
/usr/lib/python3.6/site-packages/trashcli/__pycache__
/usr/lib/python3.6/site-packages/trashcli/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/trashcli/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/trashcli/__pycache__/empty.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/trashcli/__pycache__/empty.cpython-36.pyc
/usr/lib/python3.6/site-packages/trashcli/__pycache__/fs.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/trashcli/__pycache__/fs.cpython-36.pyc
/usr/lib/python3.6/site-packages/trashcli/__pycache__/fstab.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/trashcli/__pycache__/fstab.cpython-36.pyc
/usr/lib/python3.6/site-packages/trashcli/__pycache__/list.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/trashcli/__pycache__/list.cpython-36.pyc
/usr/lib/python3.6/site-packages/trashcli/__pycache__/list_mount_points.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/trashcli/__pycache__/list_mount_points.cpython-36.pyc
/usr/lib/python3.6/site-packages/trashcli/__pycache__/put.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/trashcli/__pycache__/put.cpython-36.pyc
/usr/lib/python3.6/site-packages/trashcli/__pycache__/restore.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/trashcli/__pycache__/restore.cpython-36.pyc
/usr/lib/python3.6/site-packages/trashcli/__pycache__/rm.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/trashcli/__pycache__/rm.cpython-36.pyc
/usr/lib/python3.6/site-packages/trashcli/__pycache__/scripts.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/trashcli/__pycache__/scripts.cpython-36.pyc
/usr/lib/python3.6/site-packages/trashcli/__pycache__/trash.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/trashcli/__pycache__/trash.cpython-36.pyc
/usr/lib/python3.6/site-packages/trashcli/empty.py
/usr/lib/python3.6/site-packages/trashcli/fs.py
/usr/lib/python3.6/site-packages/trashcli/fstab.py
/usr/lib/python3.6/site-packages/trashcli/list.py
/usr/lib/python3.6/site-packages/trashcli/list_mount_points.py
/usr/lib/python3.6/site-packages/trashcli/put.py
/usr/lib/python3.6/site-packages/trashcli/restore.py
/usr/lib/python3.6/site-packages/trashcli/rm.py
/usr/lib/python3.6/site-packages/trashcli/scripts.py
/usr/lib/python3.6/site-packages/trashcli/trash.py
/usr/share/doc/trash-cli
/usr/share/doc/trash-cli/README.rst
/usr/share/man/man1/trash-empty.1.gz
/usr/share/man/man1/trash-list.1.gz
/usr/share/man/man1/trash-put.1.gz
/usr/share/man/man1/trash-restore.1.gz
/usr/share/man/man1/trash-rm.1.gz

References

Summary

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