# 使用 Homebrew, apt, Nix, zypper 安装 deheader

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

## 安装

```sh
sudo av install brew:deheader
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install deheader
```

  证据: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install deheader
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#deheader
```

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

- zypper (92%):

```sh
sudo zypper install deheader
```

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

## 软件包事实

- **软件包键:** brew:deheader
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/deheader>
- **版本:** 1.12
- **来源摘要:** Analyze C/C++ files for unnecessary headers
- **主页:** <http://www.catb.org/~esr/deheader/>
- **仓库:** <https://gitlab.com/esr/deheader>
- **上游文档:** <http://www.catb.org/~esr/deheader>
- **许可证:** BSD-2-Clause
- **源码归档:** <https://gitlab.com/esr/deheader/-/archive/1.12/deheader-1.12.tar.bz2>
- **已生成:** 2026-07-08T18:08:21+00:00

## 可执行文件

- deheader (cli)
- deheader (别名)

## 构建依赖

- asciidoctor

## macOS 提供的库

- python

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 all

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 1.12
- 本地数据: OK
- 上游仓库: http://www.catb.org/~esr/deheader/
- 信息: No package-manager update timestamp was available.
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

deheader is a C and C++ source analysis tool that finds include directives which can be removed while the file still compiles.

### 项目历史

The official project page describes deheader as a tool for removing unneeded includes, improving compilation time on large C++ projects, and exposing hidden dependencies and cohesion problems. The README says it is commonly packaged as `deheader`.

The NEWS file gives a long maintenance record beginning with 0.1 on 2010-12-01. Later releases added summary output, portability checks, duplicate include detection, Python 2/3 compatibility, Makefile-friendly exit status, GCC compatibility updates, and continued documentation and hardening fixes through 1.12 in 2026.

### 采用历史

deheader is packaged by Homebrew and appears upstream as a named package on the official project page. Its low-level C/C++ focus makes it more of a maintainer and build-hygiene tool than an end-user application.

### 使用方式

The package is used during source maintenance to test whether headers are actually required. Because it verifies removals by compilation, it belongs in the same toolbox as static-analysis and build-cleanup utilities rather than pure text linters.

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

deheader matters to package nerds because header bloat affects compile time, portability, and dependency clarity. It is especially relevant when distributions and maintainers need source trees to build cleanly across compilers, standard libraries, and Unix variants.

### 时间线

- 2010: 0.1 initial release.
- 2016: 1.5 adds exit status behavior useful in Makefiles.
- 2022: 1.8 changes the shebang to Python 3.
- 2026: 1.12 is released.

### Related projects

- The project is adjacent to C and C++ compiler toolchains, build systems, and static-analysis utilities that reduce unnecessary source dependencies.

### 来源

- <http://www.catb.org/~esr/deheader>
- <http://www.catb.org/~esr/deheader/README.adoc>
- <http://www.catb.org/~esr/deheader/NEWS.adoc>
- <https://gitlab.com/esr/deheader>
- <https://formulae.brew.sh/formula/deheader>


## 安全说明

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:** deheader
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

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

- Debian apt - deheader - 1.11-1: normalized package name match | Debian stable package indexes: deheader from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Find and remove unnecessary includes in C or C++ source files | http://www.catb.org/~esr/deheader/
- Nix - deheader: normalized package name match | nixpkgs package indexes: pkgs/by-name/de/deheader/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - deheader - 1.10-1: normalized package name match | Ubuntu 24.04 LTS package indexes: deheader from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Find and remove unnecessary includes in C or C++ source files | http://www.catb.org/~esr/deheader/
- zypper - deheader - 1.11-1.2: normalized package name match | openSUSE Tumbleweed package metadata: deheader from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Find and optionally remove unneeded includes in C or C++ sourcefiles | http://www.catb.org/~esr/deheader/


## 相关链接

- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/zh-hans/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/zh-hans/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [asciidoctor](https://www.automicvault.com/zh-hans/pkg/brew/asciidoctor/) - Build dependency declared by Homebrew.
- [bcpp](https://www.automicvault.com/zh-hans/pkg/brew/bcpp/) - Shares av.db curated category or tags: c, c-cpp, cli, cpp, developer-tools.
- [include-what-you-use](https://www.automicvault.com/zh-hans/pkg/brew/include-what-you-use/) - Shares av.db curated category or tags: c, cli, cpp, developer-tools, static-analysis.
- [pmccabe](https://www.automicvault.com/zh-hans/pkg/brew/pmccabe/) - Shares av.db curated category or tags: c, cli, cpp, developer-tools, static-analysis.
- [abi-dumper](https://www.automicvault.com/zh-hans/pkg/brew/abi-dumper/) - Shares av.db curated category or tags: c, cli, cpp, developer-tools.
- [cbmc](https://www.automicvault.com/zh-hans/pkg/brew/cbmc/) - Shares av.db curated category or tags: c, cli, developer-tools, static-analysis.
- [ccheck](https://www.automicvault.com/zh-hans/pkg/brew/ccheck/) - Shares av.db curated category or tags: c, cli, developer-tools, static-analysis.
- [cflow](https://www.automicvault.com/zh-hans/pkg/brew/cflow/) - Shares av.db curated category or tags: c, cli, developer-tools, static-analysis.
- [clangql](https://www.automicvault.com/zh-hans/pkg/brew/clangql/) - Shares av.db curated category or tags: cli, cpp, developer-tools, static-analysis.
- [recc](https://www.automicvault.com/zh-hans/pkg/brew/recc/) - Local package facts share a topical domain. Shared terms: c, cli, cpp, developer, developer-tools.

## Combined YAML source

View the package source record on GitHub. [combined/deheader.yml](https://github.com/automic-vault/db/blob/main/combined/deheader.yml)


## 来源

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