Trash CLI is a cross-platform command-line utility for moving files and folders to the operating system trash instead of permanently deleting them. It is designed as a safer alternative to using rm for everyday cleanup tasks. The command accepts individual paths as well as glob patterns, including exclusions for files that should be preserved. An optional dotfile setting allows glob patterns to include hidden files. Verbose mode prints the items that were moved, making scripted cleanup easier to inspect. It works on macOS, Linux, and Windows and can be installed globally through npm. Users can even alias rm to trash for a more reversible default deletion workflow.

Features

  • Reversible file and folder removal
  • macOS, Linux, and Windows support
  • Individual path and glob pattern input
  • Negative glob exclusions
  • Optional hidden-file matching
  • Verbose trashed-item reporting

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow Trash CLI

Trash CLI Web Site

Other Useful Business Software
Build Data Resilience - Take the Assessment Today Icon
Build Data Resilience - Take the Assessment Today

Can you recover when it matters most? Take this quick assessment to identify gaps and build greater recovery confidence.

Is your recovery strategy as strong as you think? Take this quick self-assessment to check your recovery readiness and gain tailored insights. In only 2 minutes, you'll learn where you fall on the recovery readiness scale.
Take the Assessment
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Trash CLI!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

JavaScript

Related Categories

JavaScript Command Line Tools

Registered

2026-09-09