# 使用 Homebrew, apt, dnf, MacPorts, Nix 安装 duff

查看 duff 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:duff
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install duff
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install duff
```

  证据: MacPorts ports tree: sysutils/duff/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install duff
```

  证据: Debian stable package indexes: duff from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install duff
```

  证据: Fedora Rawhide package metadata: duff from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#duff
```

  证据: nixpkgs package indexes: pkgs/by-name/du/duff/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:duff
- **软件包管理器:** Homebrew
- **版本:** 0.5.2
- **来源摘要:** Quickly find duplicates in a set of files from the command-line
- **主页:** <https://github.com/elmindreda/duff>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- duff (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 0.5.2
## 项目历史与用法

duff is an older Unix command-line duplicate-file finder that compares candidate files using SHA-family message digests. Its history is unusually well documented in its README, including its pre-release name, early private circulation, first official release, and later maintenance releases.

### 项目历史

The tool began as version 0.1 under the name duplicate, then version 0.2 became the first release named duff but was only shared with a few people in early 2005. Version 0.3 became the first official release on November 22, 2005 after the author found a suitably licensed SHA1 implementation.

Version 0.4, released January 13, 2006, was described by the project as the first stable everyday-use release. The 0.5 line in 2011 and 2012 restarted development with minor features, bug fixes, optimizations, improved default thorough-mode output, and message-prefix cleanup.

### 采用历史

duff became a portable Unix utility rather than a large ecosystem project. The README records successful builds across Linux distributions, BSDs, Darwin and Mac OS X, NetBSD, SunOS, Cygwin, and Red Hat Enterprise Linux, and package metadata shows it still exists in Homebrew, Debian, Fedora, MacPorts, Nix, and Ubuntu.

### 使用方式

The common use is scanning one or more paths for duplicate files, with duff grouping duplicate candidates after digest-based comparison. The project ships a traditional man page and autotools build, matching the packaging style of mid-2000s Unix command-line utilities.

### 为什么软件包爱好者会关心

duff is interesting as a compact, old-school duplicate finder that survived through distro packaging. It belongs to the era before newer Rust and Go disk tools, when small C utilities with man pages, autotools, and portable Unix build notes were the normal package-manager substrate.

### 时间线

- 2005: Version 0.2, the first named duff release, circulated privately.
- 2005: Version 0.3 became the first official release on November 22.
- 2006: Version 0.4 was considered stable enough for everyday use.
- 2011: Version 0.5 restarted development with minor features and fixes.
- 2012: Version 0.5.2 added optimizations and default behavior changes.

### Related projects

- fdupes and rdfind are adjacent duplicate-file finders in Unix package collections.
- Modern disk-maintenance tools overlap with duff's cleanup use case, but duff's identity remains the narrow duplicate-file finder.

### 来源

- <https://github.com/elmindreda/duff>
- <https://github.com/elmindreda/duff#readme>
- <https://formulae.brew.sh/formula/duff>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

- Debian apt - duff - 0.5.2-2: normalized package name match | Debian stable package indexes: duff from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Duplicate file finder | https://github.com/elmindreda/duff
- Nix - duff: normalized package name match | nixpkgs package indexes: pkgs/by-name/du/duff/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - duff - 0.5.2-1.1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: duff from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Duplicate file finder | http://duff.sourceforge.net/
- dnf - duff - 0.5.2-33.fc45: normalized package name match | Fedora Rawhide package metadata: duff from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Quickly find duplicate files | http://duff.sourceforge.net/
- MacPorts - duff: normalized package name match | MacPorts ports tree: sysutils/duff/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/duff.yml](https://github.com/mxcl/pkgdb/blob/main/combined/duff.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
