Open In App

How to Install Python-send2trash package on Linux?

Last Updated : 24 Feb, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Send2Trash in Python is a small package that sends files to the Trash (or Recycle Bin) natively and on all platforms like Windows, Linux, and macOS. Rather than deleting files, permanently this package sends the files in the trash box. So, in this article, we will be installing the Send2Trash package in Python on Linux operating system.

Installing Send2Trash package on Linux using PIP

Requirements:

  1. Python3
  2. Python3-pip

To install the Send2Trash package in Linux we have to follow the following steps:

Step 1: Install the latest version of Python3 on Linux Machine using the following command in the terminal:

sudo apt-get install python3

Installing-Python3-on-linux-machine

Step 2: Now, using the following command we install the pip module which is required to install and manage all the packages of Python3:

sudo apt install python3-pip

Installing-Python3-pip

Step 3: Using the following command we install the Send2Trash package:

sudo pip3 install send2trash

Installing-send2trash-package

Verifying Send2Trash package installation on Linux using PIP

To verify if the Send2Trash package has been successfully installed in your system run the below command in Terminal:

python3 -m pip show send2trash

You’ll get the following output if the installation is completed successfully in your system.

Verifying-Send2Trash-package


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads