# 使用 Homebrew, apt, dnf, MacPorts, Nix, pacman 安装 foremost

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

## 安装

```sh
sudo av install brew:foremost
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install foremost
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install foremost
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install foremost
```

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

- dnf (92%):

```sh
sudo dnf install foremost
```

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

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

- pacman (92%):

```sh
sudo pacman -S foremost
```

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

## 软件包事实

- **软件包键:** brew:foremost
- **软件包管理器:** Homebrew
- **版本:** 1.5.7
- **来源摘要:** Console program to recover files based on their headers and footers
- **主页:** <https://foremost.sourceforge.net/>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- foremost (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

Foremost is a console data-carving utility for recovering files from disk images, raw drives, and forensic images by matching file headers, footers, and internal structures.

### 项目历史

The upstream site says Foremost was originally developed by the United States Air Force Office of Special Investigations and the Center for Information Systems Security Studies and Research, then opened to the general public.

The bundled README credits Special Agents Kris Kendall and Jesse Kornblum of the USAF Office of Special Investigations, starting in March 2001, and says the project was inspired by CarvThis from the Defense Computer Forensic Lab.

### 采用历史

Foremost's adoption is tied to digital forensics workflows rather than a single language ecosystem. The official site advertises use on images from tools such as dd, Safeback, and EnCase, and links to DFRWS challenge material and sample carving test images.

It is packaged broadly across Unix package managers because it is a small C command-line tool with a stable forensic niche: file recovery by signatures without depending on a full forensic suite.

### 使用方式

Foremost can scan a disk image or drive directly, write recovered files to an output directory, and use built-in file-type detectors or a configuration file that defines extensions, case sensitivity, maximum size, headers, and optional footers.

If no configuration file is specified, the manual says Foremost first checks foremost.conf in the current directory and then /etc/foremost.conf.

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

Foremost is a classic package-manager utility: small, scriptable, old, and still useful because it implements one forensic primitive well.

Its configuration-file format is significant for package users because distributions can ship a system-wide foremost.conf while investigators can keep case-specific signatures beside evidence images.

### 时间线

- 1999: CarvThis from the Defense Computer Forensic Lab inspires the project.
- 2001: Foremost development starts at the USAF Office of Special Investigations.
- 2002: The SourceForge project metadata records public project hosting beginning in April 2002.
- 2006: The official site links Foremost material for the DFRWS 2006 challenge.
- 2007: The official site links Foremost material for the DFRWS 2007 challenge.
- 2009: Foremost 1.5.7 is published as the latest upstream source archive on the project site.

### Related projects

- Foremost is related to forensic imaging tools such as dd, Safeback, and EnCase as input sources for evidence images.
- Its README names CarvThis as an inspiration, placing Foremost in the older data-carving lineage of command-line forensic recovery tools.

### 来源

- <https://foremost.sourceforge.net/>
- <https://foremost.sourceforge.net/foremost.html>
- <https://foremost.sourceforge.net/pkg/foremost-1.5.7.tar.gz>
- <https://sourceforge.net/projects/foremost/>


## 安全说明

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

- Unix: ./foremost.conf, /etc/foremost.conf
## 其他软件包管理器记录

- Debian apt - foremost - 1.5.7-11+b2: normalized package name match | Debian stable package indexes: foremost from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | forensic program to recover lost files | https://sourceforge.net/projects/foremost/
- Nix - foremost: normalized package name match | nixpkgs package indexes: pkgs/by-name/fo/foremost/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - foremost - 1.5.7-11: normalized package name match | Ubuntu 24.04 LTS package indexes: foremost from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | forensic program to recover lost files | https://sourceforge.net/projects/foremost/
- dnf - foremost - 1.5.7-45.fc45: normalized package name match | Fedora Rawhide package metadata: foremost from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Recover files by "carving" them from a raw disk | http://foremost.sf.net
- pacman - foremost - 1.5.7-7: normalized package name match | Arch Linux sync databases: foremost from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A console program to recover files based on their headers, footers, and internal data structures | http://foremost.sourceforge.net/
- MacPorts - foremost: normalized package name match | MacPorts ports tree: sysutils/foremost/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

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