# 使用 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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
- **版本:** 1.10.8
- **来源摘要:** Command-line unarchiving tools supporting multiple formats
- **主页:** <https://theunarchiver.com/command-line>
- **仓库:** <https://github.com/MacPaw/XADMaster>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

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

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

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

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

- 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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


## 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
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
