# Install dtrx with Homebrew, apk, apt, MacPorts, Nix, zypper

Intelligent archive extraction. Version 8.7.1 via Homebrew; verified from local package data. Also installable with debian: sudo apt install dtrx.

## Install

```sh
sudo av install brew:dtrx
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install dtrx
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install dtrx
```

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

### Linux

- apk (92%):

```sh
sudo apk add dtrx
```

  Evidence: Alpine Linux edge package indexes: dtrx from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install dtrx
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#dtrx
```

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

- zypper (92%):

```sh
sudo zypper install dtrx
```

  Evidence: openSUSE Tumbleweed package metadata: dtrx from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## Package facts

- **Package key:** brew:dtrx
- **Package manager:** Homebrew
- **Version:** 8.7.1
- **Source summary:** Intelligent archive extraction
- **Homepage:** <https://pypi.org/project/dtrx/>
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- dtrx (alias)

## Install behavior

- Bottle: not available

## Freshness

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

dtrx, short for 'Do The Right eXtraction', is a small command-line archive extractor that tries to make archive unpacking predictable. Its point is cultural as much as technical: stop remembering the right `tar`, `unzip`, `cpio`, or decompressor flags and run one command.

### Project history

The current dtrx-py repository describes itself as a copy of Brett Smith's original dtrx project, with all credit attributed to the original author. The maintained Python 3 fork exists because the original Python 2-era package became difficult to keep in Linux distributions, with the README specifically citing Ubuntu 20.04+ removal from default package archives as motivation.

### Adoption history

dtrx has a long tail in Unix package managers: Homebrew, Debian/Ubuntu, Alpine, MacPorts, Nix, and openSUSE-style packaging all carry or have carried it. The modern dtrx-py project publishes releases to PyPI and GitHub to keep the tool installable for Python 3 systems.

### How it is used

Users run `dtrx archive.tar.gz` or equivalent archive names and let the tool choose extraction behavior. Its attraction is avoiding accidental directory clutter, wrong flags, or inconsistent behavior across archive formats.

### Why package nerds care

dtrx is a classic package-nerd utility: tiny, opinionated, and memorable because it wraps a messy Unix tool surface into one command. The Python 2 to Python 3 maintenance story also mirrors a common distribution-maintenance pattern, where useful old scripts survive through community continuation projects.

### Timeline

- 2007: Original dtrx homepage published by Brett Smith.
- 2020: dtrx-py GitHub repository created to carry Python 3 patches.
- 2020s: dtrx-py releases are tagged and published to PyPI.

### Related projects

- Related tools include `tar`, `unzip`, `cpio`, `p7zip`, `unar`, and distribution archive helper scripts. The maintained project is directly related to Brett Smith's original dtrx repository.

### Sources

- <https://github.com/dtrx-py/dtrx>
- <https://pypi.org/project/dtrx/>
- <http://www.brettcsmith.org/2007/dtrx/>
- <https://formulae.brew.sh/api/formula/dtrx.json>


## Security Notes

broad file, network, media, or database tool signal.

- **Geiger risk:** blue / medium
- broad file, network, media, or database tool signal

## Other Package-Manager Records

- Debian apt - dtrx - 8.5.3-3: normalized package name match | Debian stable package indexes: dtrx from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | intelligently extract multiple archive types | https://github.com/dtrx-py/dtrx
- Nix - dtrx: normalized package name match | nixpkgs package indexes: pkgs/by-name/dt/dtrx/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - dtrx - 8.5.3-1: normalized package name match | Ubuntu 24.04 LTS package indexes: dtrx from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | intelligently extract multiple archive types | https://github.com/dtrx-py/dtrx
- apk - dtrx - 8.5.3-r2: normalized package name match | Alpine Linux edge package indexes: dtrx from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Do The Right eXtraction | http://www.brettcsmith.org/2007/dtrx/
- apk - dtrx-pyc - 8.5.3-r2: normalized package name match | Alpine Linux edge package indexes: dtrx-pyc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Precompiled Python bytecode for dtrx | http://www.brettcsmith.org/2007/dtrx/
- zypper - dtrx - 8.5.3-1.6: normalized package name match | openSUSE Tumbleweed package metadata: dtrx from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Intelligent Archive Extraction Tool | https://brettcsmith.org/2007/dtrx/
- MacPorts - dtrx: normalized package name match | MacPorts ports tree: archivers/dtrx/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/dtrx.yml](https://github.com/mxcl/pkgdb/blob/main/combined/dtrx.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
