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

## 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/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-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
- **Package manager page:** <https://formulae.brew.sh/formula/foremost>
- **Version:** 1.5.7
- **Source summary:** Console program to recover files based on their headers and footers
- **Homepage:** <https://foremost.sourceforge.net/>
- **Upstream docs:** <https://foremost.sourceforge.net/>
- **License:** LicenseRef-Homebrew-public-domain
- **Source archive:** <https://foremost.sourceforge.net/pkg/foremost-1.5.7.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- foremost (cli)
- foremost (alias)

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.5.7
- Local data: ok
- Upstream repository: https://foremost.sourceforge.net/
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## 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
## Source Database Details

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

## 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-37.fc44: normalized package name match | Fedora Rawhide package metadata: foremost from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-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


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Database and data packages](https://www.automicvault.com/pkg/database-data-tools/) - Matched database, SQL, migration, or data-store metadata.
- [Security and crypto packages](https://www.automicvault.com/pkg/security-crypto-tools/) - Matched security, identity, cryptography, password, signing, or certificate metadata.
- [sleuthkit](https://www.automicvault.com/pkg/brew/sleuthkit/) - Shares av.db curated category or tags: cli, digital-forensics, file-recovery, forensics, security.
- [bulk_extractor](https://www.automicvault.com/pkg/brew/bulk-extractor/) - Shares av.db curated category or tags: cli, digital-forensics, forensics, security.
- [regipy](https://www.automicvault.com/pkg/brew/regipy/) - Shares av.db curated category or tags: cli, digital-forensics, forensics, security.
- [xmount](https://www.automicvault.com/pkg/brew/xmount/) - Shares av.db curated category or tags: cli, digital-forensics, forensics, security.
- [libewf](https://www.automicvault.com/pkg/brew/libewf/) - Shares av.db curated category or tags: cli, digital-forensics, security.
- [afflib](https://www.automicvault.com/pkg/brew/afflib/) - Shares av.db curated category or tags: cli, forensics, security.
- [binwalk](https://www.automicvault.com/pkg/brew/binwalk/) - Shares av.db curated category or tags: cli, forensics, security.
- [chainsaw](https://www.automicvault.com/pkg/brew/chainsaw/) - Shares av.db curated category or tags: cli, forensics, security.

## Combined YAML source

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


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- 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
