trash
« Back to VersTracker
Description:
CLI tool that moves files or folder to the trash
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: System utilities
Tags: cli macos utility file-management trash
Install: brew install trash
About:
Trash is a command-line interface (CLI) utility that moves files and folders to the macOS Trash instead of permanently deleting them with the rm command. This provides a safety net, allowing users to easily recover accidentally deleted items using the Finder. It integrates with the native system trash, ensuring files are handled consistently with the rest of the operating system.
Key Features:
  • Moves files to the native macOS Trash instead of permanent deletion
  • Command-line interface for easy scripting and integration
  • Supports both files and directories
  • Preserves original file metadata and location on recovery
Use Cases:
  • Safely deleting files from the terminal with the ability to restore them later
  • Cleaning up temporary files or build artifacts without risking permanent data loss
  • Scripting file management tasks that require a reversible delete operation
Alternatives:
  • rm – Standard Unix remove command is permanent and lacks a recovery option, making Trash a safer alternative for interactive use.
  • gio trash – The GNOME equivalent for Linux systems; Trash is specifically designed for macOS and its native Trash system.
Version History
Detected Version Rev Change Commit