# Install kraken2 with Homebrew, apt, apk

Taxonomic sequence classification system. Version 2.17.1 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:kraken2
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install kraken2
```

  Evidence: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install kraken2
```

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

- apk (92%):

```sh
sudo apk add k2
```

  Evidence: Alpine Linux edge package indexes: k2 from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

## Package facts

- **Package key:** brew:kraken2
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/kraken2>
- **Version:** 2.17.1
- **Source summary:** Taxonomic sequence classification system
- **Homepage:** <https://github.com/DerrickWood/kraken2>
- **Repository:** <https://github.com/DerrickWood/kraken2>
- **Upstream docs:** <https://github.com/DerrickWood/kraken2/blob/master/docs/MANUAL.markdown>
- **License:** MIT
- **Source archive:** <https://github.com/DerrickWood/kraken2/archive/refs/tags/v2.17.1.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- k2 (cli)
- kraken2 (cli)
- kraken2-build (cli)
- kraken2-inspect (cli)
- k2 (alias)
- kraken2 (alias)
- kraken2-build (alias)
- kraken2-inspect (alias)

## Dependencies

- gperftools
- libomp
- python@3.14
- wget

## Uses from macOS

- perl
- rsync

## 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.17.1
- Local data: ok
- Upstream repository: https://github.com/DerrickWood/kraken2
- Upstream latest detected: v2.17.1 (current)
- info: No package-manager update timestamp was available.
## Project history and usage

Kraken 2 is the second-generation Kraken taxonomic sequence classifier for DNA reads. It matters in bioinformatics packaging because it packages a high-performance, database-heavy scientific CLI into standard Unix package-manager workflows while still reflecting the research tool's unusually large external data requirements.

### Project history

The original Kraken classifier was published in Genome Biology in 2014 as an ultrafast metagenomic sequence classification method based on exact k-mer alignments. Kraken 2 was created after Kraken 1's speed exposed a practical problem: large k-mer/LCA databases could demand enough RAM to make the tool hard to run on ordinary workstations.

Kraken 2's manual describes the key redesign: it stores minimizers instead of every k-mer, uses a probabilistic compact hash table, supports translated search against amino-acid databases, and adds spaced seeds and special database support. The Kraken 2 paper was published in Genome Biology on 2019-11-28 and reported lower memory use and faster classification while keeping Kraken-style exact-match taxonomy assignment.

### Adoption history

Kraken 2 became part of the common metagenomics command-line toolkit because it preserved Kraken's CLI-centered workflow while reducing the memory barrier for large microbial reference databases. Its Homebrew, Debian, Ubuntu, Alpine, and source-build packaging reflects the way sequencing labs and HPC users install reproducible command-line tools across mixed Linux and macOS environments.

The project also kept compatibility with the surrounding Kraken ecosystem, including the original Kraken paper lineage and related abundance-estimation workflows such as Bracken, which helped make Kraken 2 an upgrade path rather than a disconnected replacement.

### How it is used

Users install the program, then build or download a taxonomy database before classifying reads with commands such as kraken2, kraken2-build, and kraken2-inspect. The manual emphasizes that database construction depends on external taxonomy and sequence downloads, disk space, RAM, OpenMP-capable builds, and Unix utilities.

For package managers, Kraken 2 is an example where the packaged executable is only part of the operational story: the large mutable reference database, network downloads, and local storage policy matter as much as the binary.

### Why package nerds care

Kraken 2 is a package-nerd case study in scientific software distribution: a small CLI package fronts a large and evolving data dependency that cannot simply be vendored into the formula. It also shows why bioinformatics packages often need both upstream manuals and package-manager metadata to communicate runtime expectations.

### Timeline

- 2014: The original Kraken paper was published in Genome Biology.
- 2018-06-26: The Kraken 2 GitHub repository and v2.0.6-beta release were published.
- 2019-11-28: The Kraken 2 paper was published in Genome Biology.
- 2025-11-24: Kraken 2 v2.17.1 was published on GitHub.

### Related projects

- Kraken 1 is the direct predecessor. Bracken is a related abundance-estimation tool commonly used with Kraken classification output. The broader method family includes other metagenomic classifiers and low-memory variants that respond to the same taxonomy-indexing tradeoffs.

### Sources

- <https://genomebiology.biomedcentral.com/articles/10.1186/gb-2014-15-3-r46>
- <https://github.com/DerrickWood/kraken2>
- <https://github.com/DerrickWood/kraken2/blob/master/docs/MANUAL.markdown>
- <https://github.com/DerrickWood/kraken2/releases/tag/v2.0.6-beta>
- <https://github.com/DerrickWood/kraken2/releases/tag/v2.17.1>
- <https://link.springer.com/article/10.1186/s13059-019-1891-0>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

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

## Other Package-Manager Records

- Debian apt - kraken2 - 2.1.3-1: normalized package name match | Debian stable package indexes: kraken2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | taxonomic classification system using exact k-mer matches | https://www.ccb.jhu.edu/software/kraken2/
- Ubuntu apt - kraken2 - 2.1.3-1: normalized package name match | Ubuntu 24.04 LTS package indexes: kraken2 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | taxonomic classification system using exact k-mer matches | https://www.ccb.jhu.edu/software/kraken2/
- apk - k2 - 0_git20260430-r0: installed executable or alias match | Alpine Linux edge package indexes: k2 from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Chess engine with UCI and Xboard interface | https://github.com/serg-meus/k2


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [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.
- [Scientific computing packages](https://www.automicvault.com/pkg/scientific-computing-tools/) - Matched scientific computing metadata.
- [python@3.14](https://www.automicvault.com/pkg/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [wget](https://www.automicvault.com/pkg/brew/wget/) - Runtime dependency declared by Homebrew.
- [mmseqs2](https://www.automicvault.com/pkg/brew/mmseqs2/) - Shares av.db curated category or tags: bioinformatics, cli, metagenomics, science.
- [skani](https://www.automicvault.com/pkg/brew/skani/) - Shares av.db curated category or tags: bioinformatics, cli, metagenomics, science.
- [spades](https://www.automicvault.com/pkg/brew/spades/) - Shares av.db curated category or tags: bioinformatics, cli, metagenomics, science.
- [sylph](https://www.automicvault.com/pkg/brew/sylph/) - Shares av.db curated category or tags: bioinformatics, cli, metagenomics, science.
- [vsearch](https://www.automicvault.com/pkg/brew/vsearch/) - Shares av.db curated category or tags: bioinformatics, cli, metagenomics, 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.
- [dxpy](https://www.automicvault.com/pkg/brew/dxpy/) - Both packages touch the same language runtime or ecosystem. Shared terms: bioinformatics, build, cli, python, python-3-14.
- [flye](https://www.automicvault.com/pkg/brew/flye/) - Both packages touch the same language runtime or ecosystem. Shared terms: bioinformatics, cli, python, python-3-14, science.
- [kalign](https://www.automicvault.com/pkg/brew/kalign/) - Local package facts share a topical domain. Shared terms: bioinformatics, cli, libomp, science, sequence.

## Combined YAML source

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