Send2Trash
Send file to trash natively under Mac OS X, Windows and Linux
Decision gist · record as of 2026-08-14
Yes. Send2Trash is a mature, actively maintained library with zero security vulnerabilities, low install friction, and broad platform support. Install it when you need safer file deletion with native trash integration across macOS, Windows, and Linux—particularly for user-facing applications where permanent deletion is undesirable.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction installation with no runtime dependencies.
- Active maintenance with recent commits and production-stable status across Python 3.8 through 3.14.
License · maintenance · safety
BSD-3-Clause (permissive) — BSD-3-Clause permissive license allows use in most projects without significant restrictions.
last release 2026-01-14 (212 days) · last repo commit 2026-06-16 · 311 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 45,465,590 downloads/mo, #621 on PyPI
Alternatives
Verify before relying
pip install send2trash
from send2trash import send2trash
send2trash('some_file')
send2trash(['some_file1', 'some_file2'])- Whether pywin32 or pyobjc are automatically installed or optional for native platform support
- Performance characteristics when trashing large numbers of files or very large files
- Whether TrashPermissionError handling is sufficient for production use on Freedesktop systems
What it is and what it does
Send2Trash is a small, cross-platform library that moves files to the system trash or recycle bin instead of permanently deleting them. It uses native APIs on each platform: FSMoveObjectToTrashSync on macOS, IFileOperation or SHFileOperation on Windows, and GIO or freedesktop.org trash specifications on Linux and other POSIX systems. No compilation is required because it uses ctypes to access native libraries.
The package is useful when you want safer file deletion that allows recovery, rather than permanent removal. It handles both individual files and lists of files, and raises TrashPermissionError on Freedesktop platforms when files cannot be efficiently trashed (for example, files on different devices from the home directory).
Use it for
- File manager applications that need to move files to trash instead of deleting them permanently
- Cleanup utilities that should allow users to recover accidentally removed files
- Cross-platform desktop applications requiring native trash integration on macOS, Windows, and Linux
- Testing frameworks that need to safely remove temporary test files without permanent deletion
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Send2Trash is a mature, actively maintained library with zero security vulnerabilities, low install friction, and broad platform support. Install it when you need safer file deletion with native trash integration across macOS, Windows, and Linux—particularly for user-facing applications where permanent deletion is undesirable.
Install
send2trash on PyPI
Before you install
Low friction installation with no runtime dependencies. Active maintenance with recent commits and production-stable status across Python 3.8 through 3.14.
License in practice
BSD-3-Clause permissive license allows use in most projects without significant restrictions.
Quickstart
pip install send2trash
from send2trash import send2trash
send2trash('some_file')
send2trash(['some_file1', 'some_file2'])
Verify before relying
- Whether pywin32 or pyobjc are automatically installed or optional for native platform support
- Performance characteristics when trashing large numbers of files or very large files
- Whether TrashPermissionError handling is sufficient for production use on Freedesktop systems
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 212 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 45,465,590 / month, #621 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | 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 |
Evidence: send2trash-2.1.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “send files to trash”
- Send2TrashSends files and directories to the platform's native trash or recycle…
- aiorecollectAsyncio-based Python library for querying waste pickup schedules from…
- discord-webhookSend messages to Discord channels via webhooks, with support for…
Give your agent the search over MCP, or paste the wish link into any chat.
More Desktop Environment packages
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
Jeepney is a pure Python implementation of D-Bus messaging with an I/O-free core and integration modules for different event loops, enabling inter-process communication on Linux systems.
However, the aging maintenance status (533 days since last release) means you should verify that current D-Bus implementations and your target Linux systems remain…
progressbar2 renders text-based progress bars in the terminal, handling custom widgets, concurrent bars, unknown-length progress, and clean output around logs and prints.
Detects and reports the location, dimensions, and physical properties of connected monitors across Windows, Linux, macOS, and Cygwin environments.
However, maintenance is aging (last release 2022, no updates since August 2025)—verify that DRM support on Linux and compatibility with your target Python versions…
Generates shell tab completion scripts for Python CLI applications built with argparse, supporting bash, zsh, fish, and tcsh without runtime overhead.
Install it if you build Python command-line tools and want to offer your users fast, reliable shell completion.
Provides a high-level API for common file-system operations—creating, reading, copying, deleting, and querying files and directories—without external dependencies.
Install it if you find yourself repeatedly writing path checks, directory creation, or file-copy logic; skip it if your code already uses built-in modules idiomatically.
See also universal-startfile · clipboard · aiorecollect · pyobjc-framework-AppTrackingTransparency · whichcraft · pyobjc-framework-InstantMessage · memory-tempfile · dbus-python · pyobjc-framework-PushKit · asyncssh