# Install bzip2 with Homebrew, apk, chocolatey, apt, dnf, MacPorts, Nix, pacman, scoop, zypper

Freely available high-quality data compressor. Version 1.0.8 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:bzip2
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install bzip2
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install bzip2
```

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

### Linux

- apk (92%):

```sh
sudo apk add bzip2
```

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

- Debian apt (92%):

```sh
sudo apt install bzip2
```

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

- dnf (92%):

```sh
sudo dnf install bzip2
```

  Evidence: Fedora Rawhide package metadata: bzip2 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#bzip2
```

  Evidence: nixpkgs package indexes: bzip2 from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- pacman (92%):

```sh
sudo pacman -S bzip2
```

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

- zypper (92%):

```sh
sudo zypper install bzip2
```

  Evidence: openSUSE Tumbleweed package metadata: bzip2 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

### Windows

- Chocolatey (92%):

```sh
choco install bzip2
```

  Evidence: Chocolatey community package catalog: bzip2 from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='7.756','razer-synapse-3'

- Scoop (92%):

```sh
scoop install main/bzip2
```

  Evidence: Scoop official bucket manifest trees: bucket/bzip2.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:bzip2
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/bzip2>
- **Version:** 1.0.8
- **Source summary:** Freely available high-quality data compressor
- **Homepage:** <https://sourceware.org/bzip2/>
- **Repository:** <https://sourceware.org/git?p=bzip2.git%3Ba%3Dsummary>
- **Upstream docs:** <https://sourceware.org/bzip2/docs.html>
- **License:** bzip2-1.0.6
- **Source archive:** <https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz>
- **Generated:** 2026-07-09T07:20:21+00:00

## Executables

- bunzip2 (cli)
- bzcat (cli)
- bzcmp (cli)
- bzdiff (cli)
- bzegrep (cli)
- bzfgrep (cli)
- bzgrep (cli)
- bzip2 (cli)
- bzip2recover (cli)
- bzless (cli)
- bzmore (cli)
- bunzip2 (alias)
- bzcat (alias)
- bzcmp (alias)
- bzdiff (alias)
- bzegrep (alias)
- bzfgrep (alias)
- bzgrep (alias)
- bzip2 (alias)
- bzip2recover (alias)
- bzless (alias)
- bzmore (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, monterey, sonoma, ventura, x86_64_linux

## Freshness

- Page generated: 2026-07-09
- Package-manager version: 1.0.8
- Local data: ok
- Upstream repository: https://sourceware.org/bzip2/
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

bzip2 is Julian Seward's open-source block-sorting compressor and its companion library, libbzip2. Since the late 1990s it has been one of the standard Unix compression formats for source tarballs, backups, package payloads, and long-lived archives.

### Project history

The official bzip2 manual identifies Julian Seward as author and gives the 1.0.8 manual release date as 13 July 2019, with copyright running from 1996 through 2019. The Sourceware home page describes bzip2 as a freely available, patent-free, high-quality data compressor organized as both a command-line program and a library.

Technically, bzip2 uses block-sorting compression associated with the Burrows-Wheeler transform, followed by entropy coding. Its design favored compression ratio over speed, and the official site positions it as typically compressing close to much heavier statistical compressors while remaining practical on ordinary Unix systems.

The 1.0 line became the compatibility anchor for the `.bz2` format and libbzip2 API. Sourceware's git tags preserve older public milestones from `bzip2-0.1` through `bzip2-1.0.8`, showing a package with a slow, conservative release culture after its format became infrastructure.

### Adoption history

bzip2 adoption followed the familiar Unix pattern: first as a better-compressing alternative to gzip, then as a standard option in tar pipelines, release archives, Linux distributions, and package managers. The command names `bzip2`, `bunzip2`, and `bzcat` intentionally echo gzip's workflow, reducing friction for shell users.

The package's presence across Homebrew, Debian, Ubuntu, Fedora, Alpine, Arch, MacPorts, Nix, Chocolatey, Scoop, and openSUSE reflects near-universal distribution. Even where xz and zstd displaced it for many new archives, bzip2 remains installed because decades of `.bz2` artifacts still need reliable decompression.

### How it is used

Users compress files with `bzip2`, decompress with `bunzip2`, stream with `bzcat`, compare or diff compressed files with `bzcmp` and `bzdiff`, and recover damaged block-based archives with `bzip2recover`.

Developers use libbzip2 when applications need to read or write `.bz2` streams directly. The official manual documents both the command interface and the programming interface, which is why package managers usually split runtime tools and development headers.

### Why package nerds care

bzip2 is package-nerd bedrock: it is one of the archive formats every build tool, mirror, bootstrap script, and source-fetching system eventually has to understand. A working `bunzip2` is boring until a historical tarball or distro source package requires it.

It is also a case study in conservative infrastructure. The compressor is no longer fashionable, but its stable format, simple commands, portable C implementation, and widespread packaging make it one of the quiet dependencies that keeps old source distribution workflows reproducible.

### Timeline

- 1996: Julian Seward's bzip2 copyright history begins.
- 1997: Early public tags such as `bzip2-0.1` appear in the official Sourceware git history.
- 2000: The 1.0 series establishes the long-lived format and library baseline.
- 2010: bzip2 1.0.6 becomes a widely packaged stable release.
- 2019: bzip2 1.0.8 is released and documented as the current stable version on Sourceware.

### Related projects

- gzip is the older Unix compressor whose command-line conventions bzip2 intentionally resembles.
- xz, zstd, and lzip are common later alternatives in source distribution and package-manager ecosystems.
- libbzip2 is the library interface shipped with the command-line program for applications that need `.bz2` support.

### Sources

- <https://sourceware.org/bzip2/>
- <https://sourceware.org/bzip2/manual/manual.html>
- <https://sourceware.org/git/?p=bzip2.git;a=summary>
- source_facts.package-manager


## Security Notes

broad file, network, media, or database tool signal.

- **Geiger risk:** blue / medium
- broad file, network, media, or database tool signal

## Source Database Details

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

## Other Package-Manager Records

- Debian apt - bzip2 - 1.0.8-6: normalized package name match | Debian stable package indexes: bzip2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | high-quality block-sorting file compressor - utilities | https://sourceware.org/bzip2/
- Debian apt - bzip2-doc - 1.0.8-6: normalized package name match | Debian stable package indexes: bzip2-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | high-quality block-sorting file compressor - documentation | https://sourceware.org/bzip2/
- Debian apt - libbz2-1.0 - 1.0.8-6: normalized package name match | Debian stable package indexes: libbz2-1.0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | high-quality block-sorting file compressor library - runtime | https://sourceware.org/bzip2/
- Debian apt - libbz2-dev - 1.0.8-6: normalized package name match | Debian stable package indexes: libbz2-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | high-quality block-sorting file compressor library - development | https://sourceware.org/bzip2/
- Nix - bzip2: normalized package name match | nixpkgs package indexes: bzip2 from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - bzip2 - 1.0.8-5.1: normalized package name match | Ubuntu 24.04 LTS package indexes: bzip2 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | high-quality block-sorting file compressor - utilities | https://sourceware.org/bzip2/
- Ubuntu apt - bzip2-doc - 1.0.8-5.1: normalized package name match | Ubuntu 24.04 LTS package indexes: bzip2-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | high-quality block-sorting file compressor - documentation | https://sourceware.org/bzip2/
- Ubuntu apt - libbz2-1.0 - 1.0.8-5.1: normalized package name match | Ubuntu 24.04 LTS package indexes: libbz2-1.0 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | high-quality block-sorting file compressor library - runtime | https://sourceware.org/bzip2/
- Ubuntu apt - libbz2-dev - 1.0.8-5.1: normalized package name match | Ubuntu 24.04 LTS package indexes: libbz2-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | high-quality block-sorting file compressor library - development | https://sourceware.org/bzip2/
- apk - bzip2 - 1.0.8-r6: normalized package name match | Alpine Linux edge package indexes: bzip2 from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A high-quality data compression program | https://sourceware.org/bzip2/
- apk - bzip2-dev - 1.0.8-r6: normalized package name match | Alpine Linux edge package indexes: bzip2-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A high-quality data compression program (development files) | https://sourceware.org/bzip2/
- apk - bzip2-doc - 1.0.8-r6: normalized package name match | Alpine Linux edge package indexes: bzip2-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A high-quality data compression program (documentation) | https://sourceware.org/bzip2/
- apk - bzip2-static - 1.0.8-r6: normalized package name match | Alpine Linux edge package indexes: bzip2-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A high-quality data compression program (static library) | https://sourceware.org/bzip2/
- apk - libbz2 - 1.0.8-r6: normalized package name match | Alpine Linux edge package indexes: libbz2 from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Shared library for bz2 | https://sourceware.org/bzip2/
- dnf - bzip2 - 1.0.8-23.fc44: normalized package name match | Fedora Rawhide package metadata: bzip2 from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | File compression utility | https://sourceware.org/bzip2
- dnf - bzip2-devel - 1.0.8-23.fc44: normalized package name match | Fedora Rawhide package metadata: bzip2-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Libraries and header files for apps which will use bzip2 | https://sourceware.org/bzip2


## Related links

- [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.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Archive and compression packages](https://www.automicvault.com/pkg/archive-compression-tools/) - Matched archive or compression metadata.
- [apt](https://www.automicvault.com/pkg/brew/apt/) - Popular package that depends on this formula.
- [avfs](https://www.automicvault.com/pkg/brew/avfs/) - Popular package that depends on this formula.
- [elfutils](https://www.automicvault.com/pkg/brew/elfutils/) - Popular package that depends on this formula.
- [bzip3](https://www.automicvault.com/pkg/brew/bzip3/) - Package name indicates the same formula family.
- [liblzf](https://www.automicvault.com/pkg/brew/liblzf/) - Shares av.db curated category or tags: cli, compression, data, library.
- [cmix](https://www.automicvault.com/pkg/brew/cmix/) - Shares av.db curated category or tags: cli, compression, data.
- [hdt](https://www.automicvault.com/pkg/brew/hdt/) - Shares av.db curated category or tags: cli, compression, data.
- [heatshrink](https://www.automicvault.com/pkg/brew/heatshrink/) - Shares av.db curated category or tags: cli, compression, data.
- [precomp](https://www.automicvault.com/pkg/brew/precomp/) - Shares av.db curated category or tags: cli, compression, data.
- [zfp](https://www.automicvault.com/pkg/brew/zfp/) - Shares av.db curated category or tags: cli, compression, data.
- [zxc](https://www.automicvault.com/pkg/brew/zxc/) - Shares av.db curated category or tags: cli, compression, data.
- [brotli](https://www.automicvault.com/pkg/cargo/brotli/) - Local package facts share a topical domain. Shared terms: cli, compression, compressor, data, decompression.
- [compressjs](https://www.automicvault.com/pkg/npm/compressjs/) - Local package facts share a topical domain. Shared terms: bzip2, cli, compression, data, decompression.

## Combined YAML source

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