# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper 安装 dpkg

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

## 安装

```sh
sudo av install brew:dpkg
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install dpkg
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install dpkg
```

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

### Linux

- apk (92%):

```sh
sudo apk add dpkg
```

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

- Debian apt (92%):

```sh
sudo apt install dpkg
```

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

- dnf (92%):

```sh
sudo dnf install dpkg
```

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

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

- pacman (92%):

```sh
sudo pacman -S dpkg
```

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

- zypper (92%):

```sh
sudo zypper install dpkg
```

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

## 软件包事实

- **软件包键:** brew:dpkg
- **软件包管理器:** Homebrew
- **版本:** 1.23.7
- **来源摘要:** Debian package management system
- **主页:** <https://wiki.debian.org/Teams/Dpkg>
- **最后更新:** 2026-06-22T14:03:11-07:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- dpkg (别名)
- dpkg-architecture (别名)
- dpkg-buildapi (别名)
- dpkg-buildflags (别名)
- dpkg-buildpackage (别名)
- dpkg-buildtree (别名)
- dpkg-checkbuilddeps (别名)
- dpkg-deb (别名)
- dpkg-distaddfile (别名)
- dpkg-divert (别名)
- dpkg-genbuildinfo (别名)
- dpkg-genchanges (别名)
- dpkg-gencontrol (别名)
- dpkg-gensymbols (别名)
- dpkg-maintscript-helper (别名)
- dpkg-mergechangelogs (别名)
- dpkg-name (别名)
- dpkg-parsechangelog (别名)
- dpkg-query (别名)
- dpkg-realpath (别名)
- dpkg-scanpackages (别名)
- dpkg-scansources (别名)
- dpkg-shlibdeps (别名)
- dpkg-source (别名)
- dpkg-split (别名)
- dpkg-statoverride (别名)
- dpkg-trigger (别名)
- dpkg-vendor (别名)
- update-alternatives (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

dpkg is Debian's low-level package management system: the command suite and file formats beneath apt and Debian-family package installation. It owns core operations such as unpacking, configuring, querying, building, and inspecting .deb packages.

### 项目历史

dpkg belongs to Debian's earliest packaging culture. Debian's official project history says Debian was founded by Ian Murdock on 16 August 1993, at a time when the idea of a Linux distribution was still new, and that Debian became micro packaged with detailed dependency information to keep systems consistent across upgrades.

The dpkg team page describes the team as responsible for dpkg and related tools used for low-level source and binary package management. The dpkg homepage identifies the project as the Debian Package Manager and points to released tarballs, historic tarballs, the git repository, specifications, API documentation, bug tracking, mailing lists, and downstream distributions.

The dpkg project's own history file records several source-control eras: CVS for dpkg 1.4.1 through 1.10.24, Arch maintenance beginning in December 2004, Subversion from January 2006 through July 2007, and Git beginning 25 July 2007. That VCS trail is part of dpkg's institutional history because it preserves the tool that preserves Debian systems.

### 采用历史

dpkg's direct adoption follows Debian and its derivatives. The official Debian history describes Debian as a large volunteer distribution, and the dpkg homepage points to downstream distributions and distribution-provided packages as the normal way to obtain current dpkg releases.

In everyday use, many users interact with apt, aptitude, or graphical package managers first, but dpkg remains the local authority for .deb package installation state, package database operations, maintainer-script execution, and low-level package queries. Its command suite appears on Debian, Ubuntu, and other systems that need .deb tooling, and it is also packaged by non-Debian systems for compatibility and build workflows.

### 使用方式

The dpkg manpage describes dpkg as the Debian package manager. It installs, removes, and inspects packages, maintains information about available and installed packages, and can act as a frontend to dpkg-deb and dpkg-query for supported actions.

The wider dpkg package includes developer-facing commands such as dpkg-buildpackage, dpkg-source, dpkg-shlibdeps, dpkg-gensymbols, dpkg-architecture, dpkg-buildflags, and dpkg-parsechangelog, which makes it both a system package manager component and a build-tool suite for Debian packaging.

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

dpkg is one of the canonical package-nerd tools because it embodies the .deb model: control files, package states, maintainer scripts, conffiles, triggers, diversions, alternatives, source packages, build metadata, and dependency-aware system upgrades. For Debian-family systems, apt is the friendly planner, but dpkg is the local executor and database.

Its significance is also cultural. Debian's policy-heavy, source-package-oriented packaging ecosystem depends on dpkg behavior and companion tools. Changes to dpkg ripple into bootstrapping, cross-building, reproducible builds, multiarch behavior, maintainer scripts, and downstream distributions.

### 时间线

- 1993: Debian Project officially founded by Ian Murdock.
- 2004: dpkg history file records the end of CVS-only maintenance around dpkg 1.10.24 and the move toward Arch.
- 2006: dpkg history file records Subversion maintenance beginning on 18 January 2006.
- 2007: dpkg history file records Git maintenance beginning on 25 July 2007.
- 2025: Debian Wiki records the Dpkg team page as last modified in August 2025, listing current infrastructure, documentation, and project areas.

### Related projects

- dpkg is closely related to apt and other package-manager frontends, dpkg-deb, dpkg-query, dpkg-dev, debhelper, Debian Policy, Debian source packages, and Debian derivatives such as Ubuntu. The dpkg team page also names dpkg-repack, dpkg-www, debsig-verify, dupload, and dlocate as related maintained projects.

### 来源

- <https://www.dpkg.org/ - official dpkg homepage for project identity, downloads, source repositories, docs, specs, and downstream references.>
- <https://wiki.debian.org/Teams/Dpkg - official Debian Wiki team page for role, source repository, related tools, docs, and project infrastructure.>
- <https://www.dpkg.org/history/dpkg-history.txt - official dpkg history note for CVS, Arch, Subversion, and Git maintenance eras.>
- <https://www.debian.org/doc/manuals/project-history/intro.en.html - official Debian project history for Debian's founding and packaging culture.>
- <https://www.debian.org/doc/manuals/project-history/manifesto.en.html - official Debian Manifesto text and date.>
- <https://manpages.debian.org/bookworm/dpkg/dpkg.1.en.html - official Debian manpage for dpkg behavior and related tools.>
- <https://manpages.debian.org/bookworm/dpkg/dpkg.cfg.5.en.html - official Debian manpage for dpkg configuration files.>


## 安全说明

narrow executable package without higher-risk signals.

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


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Linux: /etc/dpkg/dpkg.cfg.d/[0-9a-zA-Z_-]*, /etc/dpkg/dpkg.cfg, ~/.dpkg.cfg
## 其他软件包管理器记录

- Debian apt - dpkg - 1.22.22: normalized package name match | Debian stable package indexes: dpkg from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Debian package management system | https://wiki.debian.org/Teams/Dpkg
- Debian apt - dpkg-dev - 1.22.22: normalized package name match | Debian stable package indexes: dpkg-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Debian package development tools | https://wiki.debian.org/Teams/Dpkg
- Debian apt - dselect - 1.22.22: normalized package name match | Debian stable package indexes: dselect from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Debian package management front-end | https://wiki.debian.org/Teams/Dpkg
- Debian apt - libdpkg-dev - 1.22.22: normalized package name match | Debian stable package indexes: libdpkg-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Debian package management static library | https://wiki.debian.org/Teams/Dpkg
- Debian apt - libdpkg-perl - 1.22.22: normalized package name match | Debian stable package indexes: libdpkg-perl from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Dpkg perl modules | https://wiki.debian.org/Teams/Dpkg
- Nix - dpkg: normalized package name match | nixpkgs package indexes: pkgs/by-name/dp/dpkg/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - dpkg - 1.22.6ubuntu6: normalized package name match | Ubuntu 24.04 LTS package indexes: dpkg from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Debian package management system | https://wiki.debian.org/Teams/Dpkg
- Ubuntu apt - dpkg-dev - 1.22.6ubuntu6: normalized package name match | Ubuntu 24.04 LTS package indexes: dpkg-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Debian package development tools | https://wiki.debian.org/Teams/Dpkg
- Ubuntu apt - dselect - 1.22.6ubuntu6: normalized package name match | Ubuntu 24.04 LTS package indexes: dselect from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Debian package management front-end | https://wiki.debian.org/Teams/Dpkg
- Ubuntu apt - libdpkg-dev - 1.22.6ubuntu6: normalized package name match | Ubuntu 24.04 LTS package indexes: libdpkg-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Debian package management static library | https://wiki.debian.org/Teams/Dpkg
- Ubuntu apt - libdpkg-perl - 1.22.6ubuntu6: normalized package name match | Ubuntu 24.04 LTS package indexes: libdpkg-perl from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Dpkg perl modules | https://wiki.debian.org/Teams/Dpkg
- apk - dpkg - 1.23.7-r0: normalized package name match | Alpine Linux edge package indexes: dpkg from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Debian Package Manager | https://wiki.debian.org/Teams/Dpkg
- apk - dpkg-dev - 1.23.7-r0: normalized package name match | Alpine Linux edge package indexes: dpkg-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Debian package development tools | https://wiki.debian.org/Teams/Dpkg
- apk - dpkg-doc - 1.23.7-r0: normalized package name match | Alpine Linux edge package indexes: dpkg-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Debian Package Manager (documentation) | https://wiki.debian.org/Teams/Dpkg
- apk - dpkg-zsh-completion - 1.23.7-r0: normalized package name match | Alpine Linux edge package indexes: dpkg-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Zsh completions for dpkg | https://wiki.debian.org/Teams/Dpkg
- dnf - dpkg - 1.23.7-2.fc45: normalized package name match | Fedora Rawhide package metadata: dpkg from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Package maintenance system for Debian Linux | https://tracker.debian.org/pkg/dpkg


## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
