# 使用 Homebrew, apt, MacPorts, Nix, pacman 安装 unp

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

## 安装

```sh
sudo av install brew:unp
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install unp
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install unp
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install unp
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#unp
```

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

- pacman (92%):

```sh
sudo pacman -S unp
```

  证据: Arch Linux sync databases: unp from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

## 软件包事实

- **软件包键:** brew:unp
- **软件包管理器:** Homebrew
- **版本:** 2.0
- **来源摘要:** Unpack everything with one command
- **主页:** <https://tracker.debian.org/pkg/unp>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- ucat (别名)
- unp (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

unp is a Perl command-line wrapper that chooses the right unpacking tool for an archive. Its own source says it runs the correct unpack program depending on filename extension or, where possible, file contents; the same script also provides `ucat`, a cat-like mode for compressed contents.

### 项目历史

The current script credits the original `unp` to Andre Karwath in 1997 and the modern 1.x/2.x UI to Eduard Bloch from 2000-2009. Debian's changelog records an initial Debian release as `unp` 0.0.1-1 on 2000-03-09 and a 1.0.0 upstream release on 2000-06-04.

The package evolved as archive formats and backend tools changed. The changelog records additions for CAB, ACE, TNEF, uuencode, MIME, hqx/binhex, afio, lzop, unzoo, ppmd, 7z, jar/war/ear, lzma, xz, zstd, InnoSetup, Nullsoft/7zip-based self-extracting archives, ISO images, and experimental InstallShield cabinet support through unshield.

### 采用历史

The supplied package metadata shows `unp` packaged across Homebrew, Debian, Ubuntu, MacPorts, Nix, Arch/pacman, and other Unix-like package sets. Its long Debian changelog also shows the kind of maintenance trail common to small utility packages: dependency changes, backend recommendations, shell-completion fixes, translations, security quoting fixes, and compatibility with changing archive tools.

### 使用方式

The script's help text presents the normal workflow: pass one or more compressed files to `unp`, optionally use helper modes such as `-u` or `-U` to unpack into a directory, pass backend arguments after `--`, list supported formats with `-s`, or use `--dry-run` to print the calculated commands.

`ucat` is the related streaming mode: it uncompresses multiple file contents to standard output, acting as a wrapper around zcat, bzcat, and similar tools.

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

unp is package-nerd comfort food: a tiny wrapper whose entire point is to hide the messy zoo of archive commands behind one predictable verb. It matters less as a new compression implementation and more as glue over the installed ecosystem of unpackers, recommendations, alternatives, shell completions, and distribution policy.

The 2024 2.0 changelog entry is still about the same practical niche: switching the default recommendation toward 7zip, adding dry-run mode, generating bash completion at build time, fixing extension mappings, and adding experimental InstallShield handling via unshield.

### 时间线

- 1997: Current source credits Andre Karwath's original `unp`.
- 2000: Debian changelog records `unp` 0.0.1-1 and 1.0.0-1.
- 2004: `ucat` is added as a zcat/bzcat-style wrapper.
- 2010: 2.0 preview is described as a rewrite from scratch with `ucat` multicall use and bash completion.
- 2023: 2.0 pre-release adds zstd, InnoSetup, Nullsoft installer, ISO, and 7zip-based support.
- 2024: 2.0 adds dry-run mode, 7zip recommendation changes, completion generation, and experimental InstallShield cabinet support via unshield.

### Related projects

- unp delegates to many archive utilities rather than replacing them. Related tools and formats named in the upstream changelog and script include tar, gzip, bzip2, xz, lzma, zstd, 7zip, unrar/lhasa, cabextract, unshield, InnoSetup extractors, and `ucat` as its companion command.

### 来源

- <https://manpages.debian.org/unstable/unp/unp.1>
- <https://salsa.debian.org/blade/unp/-/raw/master/debian/changelog>
- <https://salsa.debian.org/blade/unp/-/raw/master/unp>
- source_facts.package-manager


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Debian apt - unp - 2.0: normalized package name match | Debian stable package indexes: unp from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | unpack (almost) everything with one command
- Nix - unp: normalized package name match | nixpkgs package indexes: pkgs/by-name/un/unp/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - unp - 2.0: normalized package name match | Ubuntu 24.04 LTS package indexes: unp from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | unpack (almost) everything with one command
- pacman - unp - 1:2.0-2: normalized package name match | Arch Linux sync databases: unp from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A script for unpacking a wide variety of archive formats | https://tracker.debian.org/pkg/unp
- MacPorts - unp: normalized package name match | MacPorts ports tree: archivers/unp/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/unp.yml](https://github.com/mxcl/pkgdb/blob/main/combined/unp.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
