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

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

## 安装

```sh
sudo av install brew:apt
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install apt
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add apt
```

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

- Debian apt (92%):

```sh
sudo apt install apt
```

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

- dnf (92%):

```sh
sudo dnf install apt
```

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

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

- pacman (92%):

```sh
sudo pacman -S apt
```

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

## 软件包事实

- **软件包键:** brew:apt
- **软件包管理器:** Homebrew
- **版本:** 3.3.2
- **来源摘要:** Advanced Package Tool
- **主页:** <https://wiki.debian.org/Apt>
- **最后更新:** 2026-07-31T11:59:03Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- apt (别名)
- apt-cache (别名)
- apt-cdrom (别名)
- apt-config (别名)
- apt-ftparchive (别名)
- apt-get (别名)
- apt-mark (别名)
- apt-sortpkgs (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

APT, the Advanced Package Tool, is Debian's high-level package acquisition, dependency resolution, and installation interface. It turned dpkg-based systems from local package installers into repository-driven operating systems.

### 项目历史

Debian's early package management centered on dpkg and dselect. The official Debian project history names Debian 2.1 Slink, released March 9, 1999, as the release that introduced apt as a new package-management interface and describes it as a key technical innovation.

APT grew into a family of tools and libraries. The Debian Administrator's Handbook describes apt-get as the first command-line front end developed within the APT project, with apt later added as a more interactive command-line front end while apt-get retained a stable scripted interface.

The system's configuration model also became part of Debian culture: /etc/apt/sources.list and sources.list.d define repositories, apt.conf and apt.conf.d define behavior, preferences files define pinning, and auth.conf carries machine credentials for authenticated repositories.

### 采用历史

APT's adoption tracks Debian's growth. Debian's own history says apt addressed issues from Debian's continuing expansion and established a new paradigm for package acquisition and installation on open source operating systems.

Ubuntu inherited APT as a core system interface, and the supplied metadata records apt packages or compatibility packages across Homebrew, Debian, Ubuntu, Fedora/dnf, Arch/pacman, Alpine/apk, and Nix. Some non-Debian entries exist for compatibility or tooling rather than as the native system package manager.

APT also shaped the UX expectations for later package managers: update an index, install by name, resolve dependencies, upgrade the system, pin repositories, and use signed repository metadata.

### 使用方式

The everyday flow is apt update to refresh package indexes, apt install package to install dependencies and packages, apt remove or apt purge to remove software, and apt upgrade or apt full-upgrade for system updates.

Scripts and maintainer tooling often use apt-get because Debian documents its public interface as stable for automation. Humans often use apt because it has interactive defaults and output tuned for direct terminal use.

Repository configuration is text-file driven: sources.list controls where packages come from, apt.conf controls acquisition and dpkg behavior, and auth.conf stores credentials for authenticated archive access.

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

APT is one of the defining package-manager designs. It made repository metadata, dependency solving, local package archives, upgrade planning, and signed distribution channels normal parts of Linux administration.

For package nerds, APT is also the origin point for countless secondary tools: mirror managers, repository publishers, pinning front ends, unattended-upgrade systems, PPA tooling, and fleet update wrappers. Understanding APT explains a large fraction of Debian and Ubuntu packaging behavior.

Its split between dpkg as the local package database/installer and APT as the repository-aware resolver remains one of the clearest examples of layered package-management architecture.

### 时间线

- 1995: Debian 0.93R5 uses dpkg after base-system installation.
- 1999: Debian 2.1 Slink introduces apt as a new package-management interface.
- 2000s: apt-get becomes the standard command-line front end for scripted Debian package operations.
- 2010s: apt becomes the recommended interactive front end while apt-get remains the stable scripting interface.

### Related projects

- dpkg is the lower-level Debian package installer and database underneath APT.
- aptitude, Synaptic, wajig, and other front ends build around APT or the Debian package model.
- aptly and apt-dater are downstream tools in this batch that manage repositories or remote updates for apt-based systems.

### 来源

- <https://manpages.debian.org/unstable/apt/apt.conf.5.en.html>
- <https://manpages.debian.org/unstable/apt/apt_auth.conf.5.en.html>
- <https://manpages.debian.org/unstable/apt/sources.list.5.en.html>
- <https://www.debian.org/doc/manuals/apt-guide/index.en.html>
- <https://www.debian.org/doc/manuals/debian-handbook/sect.apt-get.en.html>
- <https://www.debian.org/doc/manuals/project-history/releases.en.html>
- source_facts.package-manager


## 安全说明

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

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


## 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

- Unix: /etc/apt/apt.conf, /etc/apt/apt.conf.d/, /etc/apt/sources.list, /etc/apt/sources.list.d/

## Credential files

- Unix: /etc/apt/auth.conf, /etc/apt/auth.conf.d/*.conf
## 其他软件包管理器记录

- Debian apt - apt - 3.0.3: normalized package name match | Debian stable package indexes: apt from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | commandline package manager
- Debian apt - apt-doc - 3.0.3: normalized package name match | Debian stable package indexes: apt-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | documentation for APT
- Debian apt - apt-transport-https - 3.0.3: normalized package name match | Debian stable package indexes: apt-transport-https from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | transitional package for https support
- Debian apt - apt-utils - 3.0.3: normalized package name match | Debian stable package indexes: apt-utils from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | package management related utility programs
- Debian apt - libapt-pkg-dev - 3.0.3: normalized package name match | Debian stable package indexes: libapt-pkg-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | development files for APT's libapt-pkg and libapt-inst
- Debian apt - libapt-pkg-doc - 3.0.3: normalized package name match | Debian stable package indexes: libapt-pkg-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | documentation for APT development
- Debian apt - libapt-pkg7.0 - 3.0.3: normalized package name match | Debian stable package indexes: libapt-pkg7.0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | package management runtime library
- Nix - apt: normalized package name match | nixpkgs package indexes: pkgs/by-name/ap/apt/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - apt - 2.7.14build2: normalized package name match | Ubuntu 24.04 LTS package indexes: apt from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | commandline package manager
- Ubuntu apt - apt-doc - 2.7.14build2: normalized package name match | Ubuntu 24.04 LTS package indexes: apt-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | documentation for APT
- Ubuntu apt - apt-transport-https - 2.7.14build2: normalized package name match | Ubuntu 24.04 LTS package indexes: apt-transport-https from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | transitional package for https support
- Ubuntu apt - apt-utils - 2.7.14build2: normalized package name match | Ubuntu 24.04 LTS package indexes: apt-utils from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | package management related utility programs
- Ubuntu apt - libapt-pkg-dev - 2.7.14build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libapt-pkg-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | development files for APT's libapt-pkg and libapt-inst
- Ubuntu apt - libapt-pkg-doc - 2.7.14build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libapt-pkg-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | documentation for APT development
- Ubuntu apt - libapt-pkg6.0t64 - 2.7.14build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libapt-pkg6.0t64 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | package management runtime library
- apk - apt - 3.2.0-r0: normalized package name match | Alpine Linux edge package indexes: apt from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | APT package management tool | https://salsa.debian.org/apt-team/apt


## Combined YAML source

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