Blazing fast alternative to
rmcommand written in Rust - 2x faster on average!
- ⚡ Blazing Fast - 2x faster for medium-large files
- 📊 Always Shows Stats - Deleted files count, total size, and execution time
- 🔄 Smart Parallelism - Adaptive threshold (2000+ files)
- 🎯 Cross-platform - Works on Linux and macOS
- 💪 Highly Optimized - LTO, aggressive inlining, lock-free atomics
- ✅ Full Compatibility - Drop-in replacement for
rm -rf
curl -sSL https://raw.githubusercontent.com/ismoilovdevml/rmx/main/install.sh | bashDownload pre-built binaries from Releases:
# Linux x86_64
wget https://github.com/ismoilovdevml/rmx/releases/latest/download/rmx-x86_64-unknown-linux-musl.tar.gz
tar xzf rmx-x86_64-unknown-linux-musl.tar.gz
sudo mv rmx /usr/local/bin/
# macOS (Intel)
wget https://github.com/ismoilovdevml/rmx/releases/latest/download/rmx-x86_64-apple-darwin.tar.gz
tar xzf rmx-x86_64-apple-darwin.tar.gz
sudo mv rmx /usr/local/bin/
# macOS (Apple Silicon)
wget https://github.com/ismoilovdevml/rmx/releases/latest/download/rmx-aarch64-apple-darwin.tar.gz
tar xzf rmx-aarch64-apple-darwin.tar.gz
sudo mv rmx /usr/local/bin/- Install Rust (if not already installed):
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh- Clone and build:
git clone https://github.com/ismoilovdevml/rmx.git
cd rmx
cargo build --release
sudo cp target/release/rmx /usr/local/bin/curl -sSL https://raw.githubusercontent.com/ismoilovdevml/rmx/main/uninstall.sh | bashOr manually:
sudo rm /usr/local/bin/rmxrmx -rf /path/to/directory✓ Deleted: 10000 files, 1 directories
✓ Total size: 9.77 MB
✓ Time taken: 300.85ms
rmx -rfv /path/to/directoryrmx -r # Remove directories recursively
rmx -f # Force deletion, ignore errors
rmx -i # Interactive mode (prompt before deletion)
rmx -v # Verbose (show each file being deleted)
rmx -d # Remove empty directories
# Combine flags
rmx -rf /tmp/test
rmx -rfi /important/datarmx version # Show version
rmx about # Show program information
rmx dev # Show developer info| Test | Files | rm | rmx | Speedup |
|---|---|---|---|---|
| 1,000 × 1MB | 1,000 | 0.06s | 0.03s | 2.0x ⚡ |
| 5,000 × 1KB | 5,000 | 0.25s | 0.12s | 2.1x ⚡ |
| Nested | 1,000 | 0.06s | 0.03s | 2.0x ⚡ |
Tested on macOS Apple Silicon
Best for:
- Node.js
node_modulescleanup - Build artifacts (
target/,dist/) - Log directories
- CI/CD cleanup tasks
- Adaptive Parallelism - Sequential for <2000 files, parallel for ≥2000 files
- Lock-free Atomics -
AtomicUsizeandAtomicU64with Relaxed ordering - Cached Metadata - Uses
DirEntry::metadata()for filesystem cache - Aggressive Inlining - Hot path functions marked
#[inline(always)]
cargo build --releasecargo test
cargo clippy --release
cargo fmtMIT License - see LICENSE file
Inspired by Manuchehr Usmonov's C implementation of rm alternative.
Made with ❤️ and Rust 🦀