# 使用 Homebrew, apk, chocolatey, dnf, MacPorts, Nix, pacman, zypper, scoop, winget 安装 upx

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

## 安装

```sh
sudo av install brew:upx
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install upx
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install upx
```

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

### Linux

- apk (92%):

```sh
sudo apk add upx
```

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

- dnf (92%):

```sh
sudo dnf install upx
```

  证据: Fedora Rawhide package metadata: upx 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#upx
```

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

- pacman (92%):

```sh
sudo pacman -S upx
```

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

- zypper (92%):

```sh
sudo zypper install upx
```

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

### Windows

- Chocolatey (92%):

```sh
choco install upx
```

  证据: Chocolatey community package catalog: upx from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','unikey'

- Scoop (92%):

```sh
scoop install main/upx
```

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

- winget (92%):

```sh
winget install --id UPX.UPX -e
```

  证据: Windows Package Manager source index: UPX.UPX from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:upx
- **软件包管理器:** Homebrew
- **版本:** 5.2.0
- **来源摘要:** Compress/expand executable files
- **主页:** <https://upx.github.io/>
- **仓库:** <https://github.com/upx/upx>
- **最后更新:** 2026-06-08T16:51:09Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- upx (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

UPX, the Ultimate Packer for eXecutables, is a long-running executable compressor. Its documentation describes a free, portable, high-performance packer that commonly reduces executable and DLL size while leaving packed programs self-contained.

### 项目历史

The UPX tree traces its lineage to earlier work by Markus Oberhumer and Laszlo Molnar in the 1990s, and the NEWS file marks version 0.05 on 26 May 1998 as the first public beta. Version 1.00 followed on 26 March 2000, after rapid expansion across DOS, Windows, Linux, and other executable formats.

### 采用历史

UPX became a standard tool in release engineering because it targets executable formats rather than source code or archive files. The project moved to GitHub with the 3.92 release in December 2016 and uses the GitHub Pages site as its current home page. The batch input lists wide package-manager coverage across Homebrew, Alpine, Fedora, Arch, MacPorts, Nix, Chocolatey, Scoop, winget, and openSUSE, reflecting cross-platform demand.

### 使用方式

The core package-nerd workflow is direct and scriptable: run `upx` on a binary to pack it, use `-d` to unpack, `-t` to test, and `-l` to inspect compressed size and ratio. The documentation also discusses compression levels, `--best`, `--brute`, LZMA, overlay handling, environment-variable defaults, and format-specific caveats.

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

UPX is significant because it sits at the boundary between packaging, binary distribution, reverse engineering, antivirus analysis, and embedded-size constraints. Maintainers care about its format support, reproducibility hazards, security context warning, unpackability, and the fact that modern operating-system changes can break old packing assumptions.

### 时间线

- 1998: Version 0.05 was the first public beta.
- 2000: Version 1.00 was released.
- 2006: 2.90 beta added LZMA support for many formats.
- 2016: Version 3.92 moved the project to GitHub and the upx.github.io home page.
- 2022: Version 4.0.0 switched to semantic versioning and added easier CMake source builds.
- 2025: Version 5.0.0 introduced major ELF changes including memfd_create support for SELinux enforcing mode.
- 2026: Version 5.2.0 added the cpm86/cmd format.

### Related projects

- The NEWS file says the first public beta drew on experience from DJP, lzop, and mfxpak. UPX also relates to executable-format ecosystems such as ELF, PE, Mach-O, DOS, and firmware/kernel image formats.

### 来源

- <https://github.com/upx/upx/blob/devel/NEWS>
- <https://github.com/upx/upx/blob/devel/README>
- <https://github.com/upx/upx/blob/devel/doc/upx-doc.txt>
- input source_facts.package-manager


## 安全说明

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

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal

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

- Nix - upx: normalized package name match | nixpkgs package indexes: pkgs/by-name/up/upx/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - upx - 5.2.0-r0: normalized package name match | Alpine Linux edge package indexes: upx from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Ultimate Packer for eXecutables | https://upx.github.io/
- apk - upx-doc - 5.2.0-r0: normalized package name match | Alpine Linux edge package indexes: upx-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Ultimate Packer for eXecutables (documentation) | https://upx.github.io/
- dnf - upx - 5.2.0-2.fc45: normalized package name match | Fedora Rawhide package metadata: upx from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Ultimate Packer for eXecutables | https://github.com/upx/upx
- pacman - upx - 5.2.0-1: normalized package name match | Arch Linux sync databases: upx from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Extendable, high-performance executable packer for several executable formats | https://github.com/upx/upx
- zypper - upx - 5.2.0-1.3: normalized package name match | openSUSE Tumbleweed package metadata: upx from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | The Ultimate Packer for eXecutables | https://upx.github.io/
- MacPorts - upx: normalized package name match | MacPorts ports tree: archivers/upx/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - upx: normalized package name match | Chocolatey community package catalog: upx from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','unikey'
- Scoop - main/upx: normalized package name match | Scoop official bucket manifest trees: bucket/upx.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - UPX.UPX: normalized package name match | Windows Package Manager source index: UPX.UPX from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

View the package source record on GitHub. [combined/upx.yml](https://github.com/mxcl/pkgdb/blob/main/combined/upx.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
