# 使用 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/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:deheader
- **软件包管理器:** Homebrew
- **版本:** 1.12
- **来源摘要:** Analyze C/C++ files for unnecessary headers
- **主页:** <http://www.catb.org/~esr/deheader/>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- deheader (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

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

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

- 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.3: normalized package name match | openSUSE Tumbleweed package metadata: deheader from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Find and optionally remove unneeded includes in C or C++ sourcefiles | http://www.catb.org/~esr/deheader/


## Combined YAML source

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