skillfed

Send2Trash

Send file to trash natively under Mac OS X, Windows and Linux

send2trash Permissive license BSD-3-Clause Active 311 v2.1.0 released

Install

send2trash on PyPI

pip

pip install send2trash

uv

uv add send2trash

poetry

poetry add send2trash

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 211 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: send2trash-2.1.0-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Desktop Environment :: File Managers

About Send2Trash

from the package's own PyPI description — quoted content, verbatim

================================================== Send2Trash -- Send files to trash on all platforms ==================================================

Send2Trash is a small package that sends files to the Trash (or Recycle Bin) natively and on all platforms. On OS X, it uses native FSMoveObjectToTrashSync Cocoa calls or can use pyobjc with NSFileManager. On Windows, it uses native IFileOperation call if on Vista or newer and pywin32 is installed or falls back to SHFileOperation calls. On other platforms, if PyGObject and GIO are available, it will use this. Otherwise, it will fallback to its own implementation of the trash specifications from freedesktop.org_.

ctypes is used to access native libraries, so no compilation is necessary.

Send2Trash supports Python 3 (versions before 2.x support Python 2).

Status: Additional Help Welcome

Additional help is welcome for supporting this package. Specifically help with the OSX and Linux issues and fixes would be most appreciated.

Installation

You can download it with pip:

python -m pip install -U send2trash

To...

Read as markdown · JSON record · Source repository · Homepage

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

Send2Trash moves files to the native trash or recycle bin on Windows, macOS, and Linux, using platform-specific APIs where available and falling back to freedesktop.org trash specifications.

Low friction: pure-Python wheel with zero runtime dependencies. Active maintenance (last commit 2026-06-16) and Production/Stable status. Supports Python 3.8–3.14.

BSD-3-Clause permissive license allows commercial and private use with minimal restrictions, requiring only license and copyright notice retention.

Usage

pip install send2trash

from send2trash import send2trash
send2trash('some_file')
send2trash(['some_file1', 'some_file2'])

Python ≥3.8 required. On Windows Vista+, optional pywin32 enables native IFileOperation; on macOS, optional pyobjc enables native Cocoa calls; on Linux/BSD, optional PyGObject+GIO enable native GIO support.

Verdict: Mature, well-maintained, zero-dependency package for safe file deletion across platforms. No known vulnerabilities, permissive license, and active development make it a reliable choice for applications needing trash-bin semantics rather than permanent deletion.

Needs verification

  • Whether the optional extras (pywin32, pyobjc, PyGObject) are automatically installed or require explicit opt-in via the [nativeLib] extra
  • Performance characteristics when trashing large numbers of files or very large files
  • Specific behavior and error handling on network-mounted filesystems or unusual storage scenarios
send files to trashrecycle bin cross-platformdelete to trash instead of permanentnative trash implementationfile deletion safeplatform-agnostic trashrestore deleted files

Similar packages