Skip to main content

file-dedupe

PyPI Python Versions License: MIT CI

GitHub Sponsors Patreon Buy Me a Coffee PayPal

Find and replace duplicate files across one or more folders with hardlinks.
Uses fast parallel hashing with file attribute awareness to safely deduplicate files in-place.
Part of the Infinito.Nexus ecosystem.


📦 Installation

The tool is published on PyPI and can be installed using pip:

pip install fidedu

This installs the global command:

fidedu

You can also invoke it explicitly as a module:

python -m fidedu --help

🚀 Usage

Basic Examples

Analyze duplicates across one or more directories (dry-run mode):

fidedu ~/Documents ~/Downloads ~/Pictures

Replace duplicates with hardlinks to one canonical copy (in-place deduplication):

fidedu ~/Documents ~/Downloads ~/Pictures --compress

Verbose output (show exactly what happens):

fidedu ~/Documents ~/Downloads ~/Pictures --compress -v

Equivalent module invocation:

python -m fidedu ~/Documents ~/Downloads --compress -v

⚙️ Behavior

  1. Scans all provided folders recursively.
  2. Groups files with identical size.
  3. For each candidate group, computes a BLAKE2b hash including file attributes (mode, UID, GID, size, and modification time).
  4. Files with matching hashes are treated as true duplicates.
  5. One canonical copy is kept; all others are replaced by hardlinks pointing to it.
  6. When --compress is not used, the tool reports potential savings only (no changes are made).

Command Line Options

Option Description
--compress Apply deduplication (replace duplicates with hardlinks). Default is dry-run mode.
-v, --verbose Verbose output (show detailed linking actions).
-w, --workers N Number of parallel hashing processes (default: CPU count).

Example Output

Duplicate sets found: 12
Files involved:       57
Planned relinks:      45
Estimated savings:    1.2 GB (1,234,567,890 bytes)

[dry-run] Use --compress to apply these changes.

🧪 Testing

Run all tests locally:

make test

Lint the codebase:

make lint

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.


👤 Author

Kevin Veen-Birkenbach https://veen.world

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fidedu-2.1.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fidedu-2.1.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file fidedu-2.1.0.tar.gz.

File metadata

  • Download URL: fidedu-2.1.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for fidedu-2.1.0.tar.gz
Algorithm Hash digest
SHA256 f9dbe45b26658abf12b44035a0bfa1ea2b42353dc16da83f5efb5635c0200995
MD5 7d69de0f38d003a9172e1800e893665b
BLAKE2b-256 3f8a56b4bf8e47179763f9aa92dc50c13a880e2f162b7b8ad90b8211ed2c0978

See more details on using hashes here.

File details

Details for the file fidedu-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: fidedu-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for fidedu-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 140fc1131bcebbbe936a45a09138d86070f6f20f97bc475d139bba6e0c7db4d4
MD5 5f6ea09f6a6c3cf536e34cf4648bb7e9
BLAKE2b-256 836b9a9266f2746abe105100941aadaadd06ce2ddc022aba6cfe0cecb281183a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 files

2.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page