# Install foremost with Homebrew, apt, dnf, MacPorts, Nix, pacman

Console program to recover files based on their headers and footers. Version 1.5.7 via Homebrew; verified from local package data. Also installable with debian: sudo apt install foremost.

## Install

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

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install foremost
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install foremost
```

  Evidence: 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
```

  Evidence: 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
```

  Evidence: 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
```

  Evidence: 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
```

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

## Package facts

- **Package key:** brew:foremost
- **Package manager:** Homebrew
- **Version:** 1.5.7
- **Source summary:** Console program to recover files based on their headers and footers
- **Homepage:** <https://foremost.sourceforge.net/>
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- foremost (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 1.5.7
## Project history and usage

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.

### Project history

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.

### Adoption history

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.

### How it is used

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.

### Why package nerds care

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.

### Timeline

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

### Sources

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


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- 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
## Other Package-Manager Records

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


## Sources

- 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
