Mint

Install and Use Trash CLI on Linux Mint 20

Install and Use Trash CLI on Linux Mint 20

Introduction:

Trash CLI is a very handy tool for deleting or restoring files from a Linux system’s trash. You can also delete files from your system’s trash manually, however, if you have such a utility available, it gets very convenient for you to perform this task via the terminal instead of going all the way to your system’s trash. In this guide, we will show you how you can install and use the Trash CLI utility on a Linux Mint 20 system.

Installation of the Trash CLI on Linux Mint 20:

To install the Trash CLI on your Linux Mint 20 system, you just need to execute the following command:

$ sudo apt update && sudo apt install trash-cli

You will have to hit the “Y” character to confirm your installation once you will be asked for it.

After doing this, the installation of the Trash CLI will complete within a few seconds.

Usage of the Trash CLI on Linux Mint 20:

Now, to use the Trash CLI on your system after installing it, you need to perform the steps shown below:

Step # 1: View the Contents of your Linux Mint 20 System’s Trash:

First, you need to view the contents of your system’s trash because after all, we will attempt to empty it. Therefore, the trash must hold something in it. You can click on the file manager icon and go to the Trash tab to view its contents as shown in the following image:

Alternatively, you can launch the terminal and run the command shown below:

$ trash-list

The contents of our system’s trash are shown in the following image:

Step # 2: Remove all the Contents of your System’s Trash with the Help of the Trash CLI:

Now, we will try to remove all of these files by running the command shown below:

$ trash-empty

The above-mentioned command will not generate any output. Therefore, to verify if the contents of the Trash have actually been deleted or not, you will have to perform the following step.

Step # 3: Verify if all the Contents of your System’s Trash have been removed or not:

You will need to run the “$ trash-list” command once again but this time it will not produce any output because your Trash has been cleaned up successfully as shown in the image below:

Removal of the Trash CLI from Linux Mint 20:

To uninstall the Trash CLI from your system, you will need to execute the following command:

$ sudo apt-get purge --autoremove trash-cli

Conclusion:

This article depicted how you can install and use the Trash CLI on a Linux Mint 20 machine. Moreover, as a bonus point, it also shared with you the removal procedure of this tool from your system.

Similar Posts