██████╗ ███╗ ███╗██╗ ██╗ ██╔══██╗████╗ ████║╚██╗██╔╝ ██████╔╝██╔████╔██║ ╚███╔╝ ██╔══██╗██║╚██╔╝██║ ██╔██╗ ██║ ██║██║ ╚═╝ ██║██╔╝ ██╗ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝
⚡ Fast Parallel Deletion for Windows
Quickly delete files, folders, and resolve file locking issues at blazing speed
Benchmark on 5,301 items (5,000 files, 301 directories):
| Method | Time | vs rmx |
|---|---|---|
| ⚡ rmx | 514ms | 1.00x |
| PowerShell Remove-Item | 1,150ms | 2.2x slower |
| Feature | Description |
|---|---|
| 📁 Files & Folders | Delete individual files, directories, and batch deletions seamlessly |
| 🔥 POSIX Delete | Uses FILE_DISPOSITION_POSIX_SEMANTICS for immediate namespace removal |
| ⚡ Parallel | Multi-threaded workers with dependency-aware scheduling |
| 🎯 Direct API | Bypasses high-level abstractions using native Windows API |
| 📏 Long Paths | Handles paths >260 characters with \\?\ prefix |
| 🔄 Auto Retry | Exponential backoff for locked files |
| 🔓 Delete Locked Items | Terminate processes locking files/directories and delete them with --kill-processes |
| 🔓 Unlock Items | Unlock files/directories by closing handles and terminating locking processes without deletion using --unlock |
# Add the rmx bucket
scoop bucket add rmx https://github.com/zerx-lab/rmx
# Install
scoop install rmx# Install from GitHub
cargo install --git https://github.com/zerx-lab/rmx
# Or install from local source
cargo install --path .Download the latest release from GitHub Releases.
# Self-upgrade (recommended)
rmx upgrade
# Only check for updates
rmx upgrade --check
# Force upgrade, bypass package manager detection
rmx upgrade --forceOr update via your package manager:
# Scoop
scoop update rmx
# Cargo
cargo install --git https://github.com/zerx-lab/rmx --force# Delete a single directory
rmx ./node_modules
# Delete multiple directories at once
rmx ./target ./node_modules ./dist
# Recursively delete directory and contents
rmx -r ./build_output# Delete a single file
rmx ./log.txt
# Delete multiple files
rmx ./file1.txt ./file2.log ./cache.db# Terminate processes locking files/directories and delete them
rmx --kill-processes ./locked_directory
# Force termination, recursive deletion with locking process cleanup
rmx -rf --kill-processes ./path# Only unlock a file without deleting it
rmx --unlock ./locked_file.txt
# Unlock a directory without deleting it
rmx --unlock ./locked_directory
# Unlock with verbose output to see process details
rmx --unlock -v ./path# Dry run (preview what would be deleted without actually deleting)
rmx -n ./node_modules
# Verbose mode with detailed statistics
rmx -v --stats ./target
# Force deletion (skip confirmation prompt)
rmx --force ./path# Upgrade to the latest version
rmx upgrade
# Only check if a new version is available
rmx upgrade --check
# Force upgrade, bypass package manager detection
rmx upgrade --forcermx auto-detects the installation method (Scoop, Cargo, npm). For manual installations, it downloads the latest release from GitHub and replaces the binary in-place.
Initialize rmx shell extension for Windows Explorer right-click menu:
# Initialize shell extension (install or reinstall)
rmx initAfter initialization, right-click any file or folder to see "Delete with rmx" option.
Note: Run PowerShell or CMD as Administrator for the init command.
| Option | Description |
|---|---|
-r, -R, --recursive |
Remove directories and their contents recursively |
-f, --force |
Force deletion without confirmation |
-t, --threads <N> |
Number of worker threads (default: CPU count) |
-n, --dry-run |
Scan but don't delete |
-v, --verbose |
Show progress and errors |
--stats |
Show detailed statistics |
--no-preserve-root |
Do not treat '/' specially |
--kill-processes |
Terminate processes locking files/directories, then delete them |
--unlock |
Only unlock files/directories (close handles) without deleting |
| Subcommand | Description |
|---|---|
init |
Initialize shell extension (Windows Explorer right-click menu) |
uninstall |
Remove shell extension and context menu handler |
upgrade |
Upgrade rmx to the latest version from GitHub Releases |
upgrade --check |
Only check for updates without installing |
upgrade --force |
Force upgrade, bypass package manager detection |
| Protection | Description |
|---|---|
| 🚫 System directories | Cannot delete C:\Windows, C:\Program Files, etc. |
| 🏠 Home directory | Cannot delete user's home directory |
| 📂 Current directory | Warns when deleting CWD or its parents |
| ✅ Confirmation | Asks for confirmation by default (use -f to skip) |
CreateFileWwithFILE_SHARE_DELETEfor non-blocking accessSetFileInformationByHandlewithFILE_DISPOSITION_INFORMATION_EXFILE_DISPOSITION_POSIX_SEMANTICSfor immediate removalFILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTEfor read-only filesFindFirstFileExW/FindNextFileWfor fast enumeration
When a file is locked by another process:
- Retry up to 10 times with exponential backoff (10ms → 100ms)
- If still locked, record failure and continue with other files
- Report all failures at the end
- Windows 10 version 1607 or later
- NTFS filesystem
MIT
Made with ❤️ for Windows developers