# Install dwdiff with Homebrew, apt, MacPorts, Nix

Diff that operates at the word level. Version 2.1.4 via Homebrew; verified 2026-06-22. Also installable with debian: sudo apt install dwdiff.

## Install

```sh
sudo av install brew:dwdiff
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install dwdiff
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install dwdiff
```

  Evidence: MacPorts ports tree: textproc/dwdiff/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install dwdiff
```

  Evidence: Debian stable package indexes: dwdiff from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#dwdiff
```

  Evidence: nixpkgs package indexes: pkgs/by-name/dw/dwdiff/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:dwdiff
- **Package manager:** Homebrew
- **Version:** 2.1.4
- **Source summary:** Diff that operates at the word level
- **Homepage:** <https://os.ghalkes.nl/dwdiff.html>
- **Last updated:** 2026-06-22T14:03:13-07:00
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- dwdiff (alias)
- dwfilter (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 2.1.4
## Project history and usage

dwdiff is G. P. Halkes' word-level diff utility. The official page positions it against wdiff: mostly command-line compatible, but with user-defined whitespace and delimiter handling so punctuation or other single characters can be treated as words.

### Project history

The official copyright notice covers 2006-2018 and 2020, and the official distribution directory carries 1.0 release artifacts. Later 2.1.x news entries show maintenance releases in 2018 and 2020 for ICU/pkg-config and compiler compatibility rather than feature expansion.

### Adoption history

The official download section says several Linux distributions and BSDs shipped packages or ports, naming Fedora, FreeBSD, and OpenBSD, with additional Unix packaging through Sunfreeware, MacPorts, Homebrew, Slackbuilds.org, Slacky.eu, and OpenPKG. The batch input adds Debian, Ubuntu, Nix, MacPorts, and Homebrew entries.

### How it is used

dwdiff compares text at word granularity and prints the new text annotated with insertion and deletion markers by default. It is useful when line diffs are too coarse, especially prose, documentation, localization, and wrapped text where changed words matter more than changed lines.

### Why package nerds care

dwdiff matters because it is a classic small Unix text-processing tool that fills the gap between line-oriented diff and heavier document comparison. Its compatibility with wdiff plus delimiter controls made it packageable as a drop-in word-diff option across many Unix packaging systems.

### Timeline

- 2006: Official copyright range begins and 1.0 release artifacts are present in the official distribution directory.
- 2018: Version 2.1.2 updates ICU handling and replaces icu-config with pkg-config.
- 2020: Versions 2.1.3 and 2.1.4 fix GCC 10 and C99 compiler build issues.

### Related projects

- The official page explicitly compares dwdiff with wdiff. In the broader CLI ecosystem it complements diff, git diff --word-diff, colordiff, and document-oriented compare tools.

### Sources

- <https://os.ghalkes.nl/dwdiff.html>
- <https://os.ghalkes.nl/dist/>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Other Package-Manager Records

- Debian apt - dwdiff - 2.1.4-2+b3: normalized package name match | Debian stable package indexes: dwdiff from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | diff program that operates word by word | https://os.ghalkes.nl/dwdiff.html
- Nix - dwdiff: normalized package name match | nixpkgs package indexes: pkgs/by-name/dw/dwdiff/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - dwdiff - 2.1.4-2build2: normalized package name match | Ubuntu 24.04 LTS package indexes: dwdiff from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | diff program that operates word by word | https://os.ghalkes.nl/dwdiff.html
- MacPorts - dwdiff: normalized package name match | MacPorts ports tree: textproc/dwdiff/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/dwdiff.yml](https://github.com/mxcl/pkgdb/blob/main/combined/dwdiff.yml)


## Sources

- 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
