A safer, recoverable alternative to the traditional rm command that moves files to the system trash instead of permanently deleting them.
- File recovery - Restore individual files, files from specific day to now or all files from trash
- Trash management - List, purge, and automatically clean old files
- Shell integration - Drop-in replacement for
rmcommand - Safety first - Prevents accidental permanent deletion
- Flexible options - Force, recursive, and bypass modes available
- Enhanced output - Colored error messages and formatted table display for trash listings
- Time-based operations - Filter and manage files based on deletion timestamps
- Name conflict resolution - Automatically appends the current date and time as a suffix if a file with the same name already exists in the trash
For comprehensive guides and detailed examples, see our modular documentation:
- Installation Guide - Detailed installation instructions for all platforms
- Usage Guide - Comprehensive usage examples and workflows
- Advanced Features - Shell integration, automation, and troubleshooting
The fastest way to install rmxt:
curl -fsSL https://raw.githubusercontent.com/santoshxshrestha/rmxt/main/scripts/install.sh | bashcargo install rmxtIf you use Nix, you can run or build rmxt without installing Rust:
nix run github:santoshxshrestha/rmxtOr build the binary:
nix build github:santoshxshrestha/rmxtSee the Installation Guide for full details and prerequisites.
For detailed installation instructions including platform-specific setup, see the Installation Guide.
# Remove files safely (move to trash)
rmxt file.txt directory/
# List files in trash
rmxt list
# Recover files from trash
rmxt recover file.txt
rmxt recover-all
# Clean old files from trash
rmxt tidyFor comprehensive usage examples, workflows, and advanced operations, see the Usage Guide.
Replace rm with rmxt for safer file operations:
# Add to ~/.bashrc or ~/.zshrc
alias rm='rmxt'For complete shell integration including advanced configurations, tab completion, and cross-shell compatibility, see the Advanced Features Guide.
| Flag | Long Form | Description |
|---|---|---|
-p |
--permanent |
Permanently delete without using trash |
-r |
--recursive |
Remove directories and contents recursively |
-f |
--force |
Force removal without prompts |
-d |
--dir |
Remove empty directories |
-t |
--time |
Specify days for recovery or tidy commands |
| Command | Description |
|---|---|
list [-t days] |
Show files in trash with optional time filter |
recover <name> |
Restore specific file from trash |
recover-all |
Restore all files from trash |
purge <name> |
Permanently delete specific file from trash |
tidy [-t days] |
Remove old files from trash (default: 30 days) |
⚠️ Warning: The-p, --permanentflag permanently deletes files without moving them to trash. Use with caution!
For power users and complex workflows:
- Shell Integration and Automation - Complete shell setup and automation
- Troubleshooting - Solutions for common problems
Having issues? Check the Advanced Features Guide for solutions to common problems:
- Installation and compilation issues
- Permission and access problems
- Recovery and trash system issues
rmxt integrates with native system trash implementations across platforms:
- Linux:
~/.local/share/Trash/files/(XDG specification) - macOS:
~/.Trash/(Finder integration) - Windows: Recycle Bin (native integration)
The exact location is managed by the system's trash implementation, ensuring compatibility with your desktop environment.
We welcome contributions! Here's how you can help:
- Report Issues: Found a bug or have a feature request? Open an issue
- Submit Pull Requests: Fix bugs or add features with a pull request
- Improve Documentation: Help expand or clarify the documentation
- Share Feedback: Let us know how you use rmxt and what could be better
# Clone the repository
git clone https://github.com/santoshxshrestha/rmxt
cd rmxt
# Build and test
cargo build
cargo test
# Install locally for testing
cargo install --path .- Enhanced configuration options for trash behavior
- Performance optimizations for large directories
For technical details and advanced development topics, see the documentation guides.
This project is licensed under the MIT License.
- Homepage: https://github.com/santoshxshrestha/rmxt
- Documentation: https://github.com/santoshxshrestha/rmxt#readme
- Issues: https://github.com/santoshxshrestha/rmxt/issues