# 使用 Homebrew, apt, dnf, MacPorts, Nix, zypper, scoop 安装 unar

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

## 安装

```sh
sudo av install brew:unar
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install unar
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install unar
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install unar
```

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

- dnf (92%):

```sh
sudo dnf install unar
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#unar
```

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

- zypper (92%):

```sh
sudo zypper install unar
```

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

### Windows

- Scoop (92%):

```sh
scoop install main/unar
```

  证据: Scoop official bucket manifest trees: bucket/unar.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:unar
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/unar>
- **版本:** 1.10.8
- **来源摘要:** Command-line unarchiving tools supporting multiple formats
- **主页:** <https://theunarchiver.com/command-line>
- **仓库:** <https://github.com/MacPaw/XADMaster>
- **上游文档:** <https://theunarchiver.com/command-line>
- **许可证:** LGPL-2.1-or-later
- **源码归档:** <https://github.com/MacPaw/XADMaster/archive/refs/tags/v1.10.8.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- lsar (cli)
- unar (cli)
- lsar (别名)
- unar (别名)

## macOS 提供的库

- bzip2

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.10.8
- 本地数据: OK
- 上游仓库: https://github.com/MacPaw/XADMaster
- 检测到的最新版本: v1.10.8 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

unar packages the command-line side of The Unarchiver/XADMaster: `unar` extracts archive contents and `lsar` lists them. Its history is tied to the Mac utility The Unarchiver, but the CLI became valuable on Unix-like systems because the same engine handles many ordinary, proprietary, old, and obscure archive formats.

### 项目历史

The official command-line page explains that The Unarchiver is a macOS app while the underlying unarchiving code can run on other operating systems, exposed through the `unar` and `lsar` command-line tools for macOS, Windows, and Linux.

The XADMaster README describes the engine as an Objective-C library for archive and file unarchiving and extraction. It supports formats such as Zip, Tar, Gzip, Bzip2, 7-Zip, RAR, LhA, StuffIt, Amiga archives, CAB, and LZX; uses libxad for old and obscure formats; and notes that it was originally developed by Dag Agren.

MacPaw's 2017 acquisition announcement says it bought The Unarchiver, promised to maintain it, improve it, and keep it free. The command-line code remained available through the XADMaster repository, with GitHub releases continuing through v1.10.8 in 2023.

### 采用历史

The official command-line page documents binary downloads for macOS and Windows and notes Ubuntu 12.04 packages under the package name `unar`. The input package metadata shows wider packaging across Homebrew, Debian, Fedora, MacPorts, Nix, Scoop, Ubuntu, and openSUSE.

In package-manager culture, `unar` spread because archive extraction is a recurring automation problem and the standard base tools do not cover the long tail of RAR, StuffIt, old Mac, Amiga, disk-image, and installer formats.

### 使用方式

`unar` is used when a script or shell user needs extraction; `lsar` is used to inspect archive contents first. The official page gives package-manager installation examples and source build instructions for Linux with GNUstep and compression-library dependencies.

The package is especially useful in archival, reverse-engineering, data-recovery, and media-library workflows where the input archive format is unknown or old. It is less about compression creation and more about robust unpacking.

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

unar is a package-nerd favorite because it turns a broad, format-savvy desktop unarchiver into a scriptable CLI. It fills the gap between base `tar`/`unzip` utilities and format-specific tools such as `unrar`.

Its long-tail format support also makes it valuable for reproducible package tests and historical software archives: a package manager can install one tool that understands many weird archives.

### 时间线

- 2017: MacPaw announces acquisition of The Unarchiver and related technology.
- 2018: MacPaw/XADMaster GitHub repository is created.
- 2018: XADMaster GitHub releases include v1.10.4.
- 2023: XADMaster v1.10.8 is released.

### Related projects

- The Unarchiver is the macOS GUI application using the same underlying unarchiving code.
- XADMaster is the upstream library/repository; libxad and UniversalDetector are related components noted by the official README.

### 来源

- GitHub release metadata via `gh api repos/MacPaw/XADMaster/releases`
- <https://github.com/MacPaw/XADMaster>
- <https://macpaw.com/news/macpaw-bought-unarchiver>
- <https://theunarchiver.com/>
- <https://theunarchiver.com/command-line>
- source_facts.package-manager


## 安全说明

narrow executable package without higher-risk signals.

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

## 源数据库详情

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

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

- Debian apt - unar - 1.10.8+ds1-9: normalized package name match | Debian stable package indexes: unar from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Unarchiver for a variety of file formats | https://theunarchiver.com/command-line
- Nix - unar: normalized package name match | nixpkgs package indexes: pkgs/by-name/un/unar/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - unar - 1.10.7+ds1+really1.10.1-3build1: normalized package name match | Ubuntu 24.04 LTS package indexes: unar from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Unarchiver for a variety of file formats | https://theunarchiver.com/command-line
- dnf - unar - 1.10.8-17.fc45: normalized package name match | Fedora Rawhide package metadata: unar from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Multi-format extractor | https://theunarchiver.com/command-line
- zypper - unar - 1.10.8-3.8: normalized package name match | openSUSE Tumbleweed package metadata: unar from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Multi-format unarchiver | https://unarchiver.c3.cx/commandline
- MacPorts - unar: normalized package name match | MacPorts ports tree: archivers/unar/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/unar: normalized package name match | Scoop official bucket manifest trees: bucket/unar.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Archive and compression packages](https://pkg.so/zh-hans/archive-compression-tools/) - Matched archive or compression metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://pkg.so/zh-hans/brew-utility-packages/) - Matched Homebrew package provider.
- [bazarr](https://pkg.so/zh-hans/brew/bazarr/) - Popular package that depends on this formula.
- [p7zip](https://pkg.so/zh-hans/brew/p7zip/) - Shares pkgdb curated category or tags: archive, cli, compression, file-utilities, system.
- [gnu-tar](https://pkg.so/zh-hans/brew/gnu-tar/) - Shares pkgdb curated category or tags: archive, cli, compression, system.
- [libzip](https://pkg.so/zh-hans/brew/libzip/) - Shares pkgdb curated category or tags: archive, cli, compression, system.
- [squashfs](https://pkg.so/zh-hans/brew/squashfs/) - Shares pkgdb curated category or tags: archive, cli, compression, system.
- [gzip](https://pkg.so/zh-hans/brew/gzip/) - Shares pkgdb curated category or tags: archive, cli, compression, system.
- [borgbackup](https://pkg.so/zh-hans/brew/borgbackup/) - Shares pkgdb curated category or tags: archive, cli, compression, system.
- [dtrx](https://pkg.so/zh-hans/brew/dtrx/) - Shares pkgdb curated category or tags: archive, cli, compression, system.
- [plzip](https://pkg.so/zh-hans/brew/plzip/) - Shares pkgdb curated category or tags: archive, cli, compression, system.
- [zip-a-folder](https://pkg.so/zh-hans/npm/zip-a-folder/) - Local package facts share a topical domain. Shared terms: archive, cli, compression, file, system.

## Combined YAML source

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


## 来源

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