# 使用 Homebrew, apt, MacPorts 安装 tmpreaper

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

## 安装

```sh
sudo av install brew:tmpreaper
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install tmpreaper
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install tmpreaper
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install tmpreaper
```

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

## 软件包事实

- **软件包键:** brew:tmpreaper
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/tmpreaper>
- **版本:** 1.6.18
- **来源摘要:** Clean up files in directories based on their age
- **主页:** <https://packages.debian.org/sid/tmpreaper>
- **上游文档:** <https://packages.debian.org/sid/tmpreaper>
- **许可证:** GPL-2.0-only
- **源码归档:** <https://ftp.debian.org/debian/pool/main/t/tmpreaper/tmpreaper_1.6.18.tar.xz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- tmpreaper (cli)
- tmpreaper (别名)

## 构建依赖

- autoconf
- automake

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.6.18
- 本地数据: OK
- 上游仓库: https://packages.debian.org/sid/tmpreaper
- 信息: No package-manager update timestamp was available.
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

tmpreaper is a long-lived Debian system-maintenance utility for removing old files from temporary directories based on access, modification, or change time.

### 项目历史

The Debian manpage describes tmpreaper as a tool that recursively removes files and empty directories that have not been accessed for a specified period, especially in temporary holding areas such as /tmp. It emphasizes security behavior: avoiding symlink traversal, avoiding chdir(".."), not switching file systems, and stopping after a default runtime limit to reduce race-condition exposure.

The manpage names Karl M. Hegbloom as author, says tmpreaper is mostly based on tmpwatch 1.2/1.4 by Erik Troan, and lists Paul Slootman as the Debian maintainer. The Debian changelog shows active maintenance going back to the late 1990s and continuing through the 2025 1.6.18 release.

### 采用历史

tmpreaper is historically rooted in Debian administration rather than in a GitHub-first CLI culture. Debian's package page places it in the admin section and documents the daily run configured through /etc/tmpreaper.conf.

The supplied source facts show availability through Homebrew, Debian, Ubuntu, and MacPorts. That spread reflects its appeal to users who want an established temp-file cleanup tool on both Linux distributions and macOS package ecosystems.

### 使用方式

System administrators use tmpreaper to clean directories such as /tmp with explicit age thresholds and protect patterns. The manpage documents dry-run behavior, verbose output, shell-command-style reporting of deletions, ctime and mtime modes, symlink handling, runtime limits, and protect patterns.

For package-focused users, tmpreaper is the classic installable answer to a recurring housekeeping problem: clean old temporary files without writing an ad hoc find command for every host, while retaining options shaped by multi-user Unix security concerns.

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

tmpreaper is significant because it embodies the older Debian package model: a small C utility, a manpage, a conffile, cron integration, and decades of changelog-driven maintenance. It is not trendy, but it is exactly the kind of durable system utility package nerds notice.

Its history is also a reminder that temp cleanup is security-sensitive. The changelog records fixes for directory traversal, bind-mount/race-condition issues, systemd PrivateTmp protection, default ignore patterns, and reproducible-build concerns.

### 时间线

- 1998: Debian changelog entries show tmpreaper 1.4.x maintained by Karl M. Hegbloom.
- 2001: Version 1.5.0 added autoconf support and portability work for Solaris and NetBSD.
- 2002: Version 1.6.0 added ctime handling for Samba-share scenarios.
- 2003: Version 1.6.1 made cron execution opt-in through /etc/tmpreaper.conf and added runtime limiting.
- 2019: Version 1.6.14 fixed CVE-2019-3461-related bind-mount race-condition behavior.
- 2025: Version 1.6.18 was accepted into Debian unstable and migrated to testing.

### Related projects

- tmpwatch is the older cleanup utility named by the tmpreaper manpage as the basis for tmpreaper.
- Debian cron and /etc/tmpreaper.conf are the package integration points documented by Debian.

### 来源

- <https://manpages.debian.org/tmpreaper>
- <https://metadata.ftp-master.debian.org/changelogs//main/t/tmpreaper/tmpreaper_1.6.18_changelog>
- <https://packages.debian.org/sid/tmpreaper>
- <https://tracker.debian.org/pkg/tmpreaper>
- input.source_facts.package-manager


## 安全说明

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/tmpreaper.conf
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** tmpreaper
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

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

- Debian apt - tmpreaper - 1.6.18: normalized package name match | Debian stable package indexes: tmpreaper from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | cleans up files in directories based on their age
- Ubuntu apt - tmpreaper - 1.6.17+nmu1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: tmpreaper from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | cleans up files in directories based on their age
- MacPorts - tmpreaper: normalized package name match | MacPorts ports tree: sysutils/tmpreaper/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://pkg.so/zh-hans/brew-utility-packages/) - Matched Homebrew package provider.
- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Matched curated package taxonomy and local package facts.
- [autoconf](https://pkg.so/zh-hans/brew/autoconf/) - Build dependency declared by Homebrew.
- [automake](https://pkg.so/zh-hans/brew/automake/) - Build dependency declared by Homebrew.
- [tmpwatch](https://pkg.so/zh-hans/brew/tmpwatch/) - Shares pkgdb curated category or tags: cleanup, cli, system, system-maintenance, temporary-files.
- [mole](https://pkg.so/zh-hans/brew/mole/) - Shares pkgdb curated category or tags: cleanup, cli, system, system-maintenance.
- [topgrade](https://pkg.so/zh-hans/brew/topgrade/) - Shares pkgdb curated category or tags: cli, system, system-maintenance.
- [mac-cleanup-go](https://pkg.so/zh-hans/brew/mac-cleanup-go/) - Shares pkgdb curated category or tags: cleanup, cli, system.
- [rmlint](https://pkg.so/zh-hans/brew/rmlint/) - Shares pkgdb curated category or tags: cleanup, cli, system.
- [detox](https://pkg.so/zh-hans/brew/detox/) - Shares pkgdb curated category or tags: cleanup, cli, system.
- [rmrfrs](https://pkg.so/zh-hans/brew/rmrfrs/) - Shares pkgdb curated category or tags: cleanup, cli, system.
- [xz](https://pkg.so/zh-hans/brew/xz/) - Shares pkgdb curated category or tags: cli, system.
- [unyaffs](https://pkg.so/zh-hans/brew/unyaffs/) - Local package facts share a topical domain. Shared terms: cli, files, system.

## Combined YAML source

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


## 来源

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