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

Intelligent archive extraction. Version 8.7.1 via Homebrew; verified from local package data.

## 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/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:dtrx
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/dtrx>
- **Version:** 8.7.1
- **Source summary:** Intelligent archive extraction
- **Homepage:** <https://pypi.org/project/dtrx/>
- **Repository:** <https://github.com/dtrx-py/dtrx>
- **Upstream docs:** <https://github.com/dtrx-py/dtrx#readme>
- **License:** GPL-3.0-or-later
- **Source archive:** <https://files.pythonhosted.org/packages/12/c2/e678320a0051cbbe5de91d1836998bac858086852a135441d7d0bfddc1c1/dtrx-8.7.1.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- dtrx (cli)
- dtrx (alias)

## Dependencies

- p7zip
- python@3.14
- xz

## Uses from macOS

- bzip2
- unzip

## Install behavior

- Post-install hook: not defined
- Bottle: available on all

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 8.7.1
- Local data: ok
- Upstream repository: https://pypi.org/project/dtrx/
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## 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

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** dtrx
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## 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.5: normalized package name match | openSUSE Tumbleweed package metadata: dtrx from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-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


## Related links

- [Package publisher tools](https://www.automicvault.com/pkg/package-publishers/) - Belongs to a package publishing or registry command family.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Archive and compression packages](https://www.automicvault.com/pkg/archive-compression-tools/) - Matched archive or compression metadata.
- [p7zip](https://www.automicvault.com/pkg/brew/p7zip/) - Runtime dependency declared by Homebrew.
- [python@3.14](https://www.automicvault.com/pkg/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [xz](https://www.automicvault.com/pkg/brew/xz/) - Runtime dependency declared by Homebrew.
- [gnu-tar](https://www.automicvault.com/pkg/brew/gnu-tar/) - Shares av.db curated category or tags: archive, archive-management, cli, compression, system.
- [borgbackup](https://www.automicvault.com/pkg/brew/borgbackup/) - Shares av.db curated category or tags: archive, cli, compression, system.
- [clzip](https://www.automicvault.com/pkg/brew/clzip/) - Shares av.db curated category or tags: archive, cli, compression, system.
- [gzip](https://www.automicvault.com/pkg/brew/gzip/) - Shares av.db curated category or tags: archive, cli, compression, system.
- [innoextract](https://www.automicvault.com/pkg/brew/innoextract/) - Shares av.db curated category or tags: archive, cli, extraction, system.
- [libzip](https://www.automicvault.com/pkg/brew/libzip/) - Shares av.db curated category or tags: archive, cli, compression, system.
- [lunzip](https://www.automicvault.com/pkg/brew/lunzip/) - Shares av.db curated category or tags: archive, cli, compression, system.

## Combined YAML source

View the package source record on GitHub. [combined/dtrx.yml](https://github.com/automic-vault/db/blob/main/combined/dtrx.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
