Skip to content
Related Articles

Related Articles

How to Install Python-send2trash package on Linux?

View Discussion
Improve Article
Save Article
Like Article
  • Last Updated : 24 Feb, 2022

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

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!