ddupe

Crates.ioddupe
lib.rsddupe
version1.1.0
created_at2025-12-02 21:52:53.4777+00
updated_at2025-12-08 11:54:48.440934+00
descriptionFast, cross-platform CLI for finding and removing duplicate files by content hash.
homepagehttps://github.com/Morrolan/ddupe
repositoryhttps://github.com/Morrolan/ddupe
max_upload_size
id1962748
size74,134
Ian Havelock (Morrolan)

documentation

https://docs.rs/ddupe

README

ddupe

CI Coverage Release License: LGPL v3 Rust Version Platform

ddupe is a fast, safe, cross-platform command-line tool for finding and removing duplicate files.
Duplicates are detected by hashing file contents using SHA-256, so files are matched by content, not name or location.

Useful for cleaning up:

  • Photo collections
  • Download folders
  • Backups / archives
  • Source trees
  • Any directory full of near-identical files

ddupe works recursively and will scan an entire directory tree.


📘 Summary

Item Details
Name ddupe
Description Fast, safe, cross-platform duplicate-file detector & cleaner
Languages Rust (CLI, async-ready, cross-platform)
Supported OS Linux · macOS · Windows
Duplicate Method SHA-256 content hashing (filename/location independent)
Key Features Recursive scan · Colourised output · Progress bar · Dry-run mode
Safety Interactive confirmation step before deletion
Binary Releases Available for Linux/macOS/Windows (built via GitHub Actions)
License LGPL-3.0-or-later
CI rustfmt · clippy (warnings = errors) · unit + integration tests

🚀 Capabilities at a Glance

  • 🔎 Deep recursive scanning of entire directory trees
  • 🧠 Content-based detection using SHA-256 hashes
  • 🎨 Readable output with colours and group markers
  • 📊 Progress bars for large scans
  • 🧪 Dry-run mode for safe previews
  • 🗑️ Optional deletion with clear KEEP/DUPE status
  • 💾 Total space estimate before removing anything
  • 🧰 Pure Rust library + thin CLI wrapper
  • 🌍 Cross-platform binaries via GitHub Actions

❓ Why ddupe?

Most duplicate cleaners rely on filenames, heuristics, or metadata.
ddupe instead:

  • hashes the actual file content
  • groups truly identical files regardless of name or location
  • avoids false matches or “smart guessing”
  • works the same on Linux, macOS, and Windows
  • is scriptable, testable, and written with safe Rust practices

✨ Features

  • 🔍 Fast recursive scanning
  • 🧠 Content-based deduplication (SHA-256)
  • 🎨 Colourised output for clarity
  • 📊 Progress bar while hashing
  • 🧮 Reports how much disk space can be freed
  • 👟 Interactive mode (-i) to accept/reject each duplicate (or keep all)
  • 🔒 Safe by default – always asks before deleting
  • 🧪 Dry-run mode (--dry-run) to preview deletions
  • 🧾 JSON report output (--json-output <file>) that never deletes or prompts
  • 💥 Optional Windows/Linux/macOS binaries (cross-compiled)

📦 Installation

🔧 Build from source (recommended)

git clone https://github.com/yourname/ddupe.git
cd ddupe
cargo build --release
# binary will be at target/release/ddupe

🧾 JSON report (no deletions)

Export a structured report without deleting or prompting:

ddupe --json-output /path/to/report.json /path/to/scan

This behaves like a dry run: it never deletes files, produces no terminal output, and writes the analysis to the specified JSON file. In the JSON report, all files in a duplicate group are listed (no preselected “keep”). It skips the KEEP/DUPE listing but still shows the header and progress.

🛠️ Development

cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
cargo test
Commit count: 0

cargo fmt