# Install bedtools with Homebrew, apt, MacPorts, Nix

Tools for genome arithmetic (set theory on the genome). Version 2.31.1 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:bedtools
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install bedtools
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install bedtools
```

  Evidence: MacPorts ports tree: science/bedtools/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install bedtools
```

  Evidence: Debian stable package indexes: bedtools from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#bedtools
```

  Evidence: nixpkgs package indexes: pkgs/by-name/be/bedtools/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:bedtools
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/bedtools>
- **Version:** 2.31.1
- **Source summary:** Tools for genome arithmetic (set theory on the genome)
- **Homepage:** <https://github.com/arq5x/bedtools2>
- **Repository:** <https://github.com/arq5x/bedtools2>
- **Upstream docs:** <https://bedtools.readthedocs.io/en/latest>
- **License:** MIT
- **Source archive:** <https://github.com/arq5x/bedtools2/archive/refs/tags/v2.31.1.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- annotateBed (cli)
- bamToBed (cli)
- bamToFastq (cli)
- bed12ToBed6 (cli)
- bedToBam (cli)
- bedToIgv (cli)
- bedpeToBam (cli)
- bedtools (cli)
- closestBed (cli)
- clusterBed (cli)
- complementBed (cli)
- coverageBed (cli)
- expandCols (cli)
- fastaFromBed (cli)
- flankBed (cli)
- genomeCoverageBed (cli)
- getOverlap (cli)
- groupBy (cli)
- intersectBed (cli)
- linksBed (cli)
- mapBed (cli)
- maskFastaFromBed (cli)
- mergeBed (cli)
- multiBamCov (cli)
- multiIntersectBed (cli)
- nucBed (cli)
- pairToBed (cli)
- pairToPair (cli)
- randomBed (cli)
- shiftBed (cli)
- shuffleBed (cli)
- slopBed (cli)
- sortBed (cli)
- subtractBed (cli)
- tagBam (cli)
- unionBedGraphs (cli)
- windowBed (cli)
- windowMaker (cli)
- annotateBed (alias)
- bamToBed (alias)
- bamToFastq (alias)
- bed12ToBed6 (alias)
- bedToBam (alias)
- bedToIgv (alias)
- bedpeToBam (alias)
- bedtools (alias)
- closestBed (alias)
- clusterBed (alias)
- complementBed (alias)
- coverageBed (alias)
- expandCols (alias)
- fastaFromBed (alias)
- flankBed (alias)
- genomeCoverageBed (alias)
- getOverlap (alias)
- groupBy (alias)
- intersectBed (alias)
- linksBed (alias)
- mapBed (alias)
- maskFastaFromBed (alias)
- mergeBed (alias)
- multiBamCov (alias)
- multiIntersectBed (alias)
- nucBed (alias)
- pairToBed (alias)
- pairToPair (alias)
- randomBed (alias)
- shiftBed (alias)
- shuffleBed (alias)
- slopBed (alias)
- sortBed (alias)
- subtractBed (alias)
- tagBam (alias)
- unionBedGraphs (alias)
- windowBed (alias)
- windowMaker (alias)

## Dependencies

- xz

## Uses from macOS

- bzip2

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 2.31.1
- Local data: ok
- Upstream repository: https://github.com/arq5x/bedtools2
- Upstream latest detected: v2.31.1 (current)
- info: No package-manager update timestamp was available.
## Project history and usage

bedtools is one of the standard command-line toolkits for genome arithmetic: set-theory style operations over BED, BAM, GFF/GTF, VCF, and related genomic interval data.

### Project history

Aaron Quinlan first created bedtools in spring 2009 to answer genomics questions that were too slow or awkward with existing web tools and locally installed UCSC/Kent utilities. The official overview says the initial public version appeared in spring 2009 and originally supported only 6-column BED files.

The project was described in the 2010 Bioinformatics paper 'BEDTools: a flexible suite of utilities for comparing genomic features.' The toolkit later expanded beyond BED to support BAM alignments, GFF, blocked BED, and VCF, while keeping the command-line pipeline model.

The modern bedtools2 GitHub repository was created in December 2013. The README describes bedtools as the 'swiss army knife for genome arithmetic' and says it is maintained by the Quinlan Laboratory at the University of Virginia.

### Adoption history

The supplied metadata shows bedtools packaged across Homebrew, Debian, Ubuntu, MacPorts, Nix, and other distribution indexes, reflecting broad adoption as a default genomics CLI dependency.

bedtools adoption is also visible in downstream tooling: the README asks users to cite pybedtools separately, and the docs emphasize combining bedtools operations with Unix pipes for more sophisticated analyses.

### How it is used

Common bedtools workflows include intersecting intervals, merging nearby features, computing coverage, extracting FASTA sequence, shuffling or randomizing intervals, generating genome coverage, mapping summaries over overlaps, and converting between BAM, BED, FASTQ, and other formats.

The toolkit is designed for shell composition. The official overview highlights stdin support so users can stream multiple commands together and control exactly how overlap results are reported.

### Why package nerds care

bedtools is package-nerd significant because it is a canonical scientific Unix package: a suite of many small executables, stable command names, text formats, manpage-like docs, and enormous downstream workflow dependence.

It also demonstrates the tension package managers handle for research software: upstream users expect old command aliases such as intersectBed and newer unified bedtools subcommands, while distributions need reproducible builds for C++ genomics tooling that is commonly used in pipelines and papers.

In the bioinformatics package graph, bedtools is not just an application; it is infrastructure. Other tools, workflow examples, papers, and wrappers often assume it exists on PATH.

### Timeline

- 2009: Initial public version released in spring 2009.
- 2010: BEDTools paper published in Bioinformatics.
- 2013: bedtools2 GitHub repository created.
- 2021: v2.30.0 release published.
- 2023: v2.31.1 release published.

### Related projects

- BEDOPS is a close peer focused on sorted-data performance, Starch compression, and scalable interval operations.
- pybedtools wraps bedtools functionality for Python users and has its own Bioinformatics citation.
- UCSC Genome Browser, Galaxy, and Kent source utilities are named in the official overview as predecessor tools that shaped bedtools' motivation.

### Sources

- <https://api.github.com/repos/arq5x/bedtools2>
- <https://bedtools.readthedocs.io/en/latest/content/overview.html>
- <https://github.com/arq5x/bedtools2#readme>
- <https://github.com/arq5x/bedtools2/releases>
- source_facts.package-manager


## Security Notes

infrastructure mutation or orchestration signal.

- **Geiger risk:** orange / medium
- infrastructure mutation or orchestration signal

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** bedtools
- **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

## Other Package-Manager Records

- Debian apt - bedtools - 2.31.1+dfsg-2: normalized package name match | Debian stable package indexes: bedtools from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | suite of utilities for comparing genomic features | https://github.com/arq5x/bedtools2
- Debian apt - bedtools-test - 2.31.1+dfsg-2: normalized package name match | Debian stable package indexes: bedtools-test from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | test data for the bedtools package | https://github.com/arq5x/bedtools2
- Nix - bedtools: normalized package name match | nixpkgs package indexes: pkgs/by-name/be/bedtools/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - bedtools - 2.31.1+dfsg-2: normalized package name match | Ubuntu 24.04 LTS package indexes: bedtools from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | suite of utilities for comparing genomic features | https://github.com/arq5x/bedtools2
- Ubuntu apt - bedtools-test - 2.31.1+dfsg-2: normalized package name match | Ubuntu 24.04 LTS package indexes: bedtools-test from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | test data for the bedtools package | https://github.com/arq5x/bedtools2
- MacPorts - bedtools: normalized package name match | MacPorts ports tree: science/bedtools/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [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.
- [xz](https://www.automicvault.com/pkg/brew/xz/) - Runtime dependency declared by Homebrew.
- [autocycler](https://www.automicvault.com/pkg/brew/autocycler/) - Shares av.db curated category or tags: bioinformatics, cli, genome, science.
- [abpoa](https://www.automicvault.com/pkg/brew/abpoa/) - Shares av.db curated category or tags: bioinformatics, cli, science.
- [abricate](https://www.automicvault.com/pkg/brew/abricate/) - Shares av.db curated category or tags: bioinformatics, cli, science.
- [abyss](https://www.automicvault.com/pkg/brew/abyss/) - Shares av.db curated category or tags: bioinformatics, cli, science.
- [adapterremoval](https://www.automicvault.com/pkg/brew/adapterremoval/) - Shares av.db curated category or tags: bioinformatics, cli, science.
- [alevin-fry](https://www.automicvault.com/pkg/brew/alevin-fry/) - Shares av.db curated category or tags: bioinformatics, cli, science.
- [any2fasta](https://www.automicvault.com/pkg/brew/any2fasta/) - Shares av.db curated category or tags: bioinformatics, cli, science.
- [augustus](https://www.automicvault.com/pkg/brew/augustus/) - Shares av.db curated category or tags: bioinformatics, cli, science.
- [fastk](https://www.automicvault.com/pkg/brew/fastk/) - Local package facts share a topical domain. Shared terms: bioinformatics, cli, science, xz.
- [tabixpp](https://www.automicvault.com/pkg/brew/tabixpp/) - Local package facts share a topical domain. Shared terms: bioinformatics, cli, science, xz.
- [vcflib](https://www.automicvault.com/pkg/brew/vcflib/) - Local package facts share a topical domain. Shared terms: bioinformatics, cli, science, xz.

## Combined YAML source

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


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- 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
