# Install libarchive with Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper

Multi-format archive and compression library. Version 3.8.8 via Homebrew; verified 2026-06-24.

## Install

```sh
sudo av install brew:libarchive
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install libarchive
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install libarchive
```

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

### Linux

- apk (92%):

```sh
sudo apk add libarchive
```

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

- Debian apt (92%):

```sh
sudo apt install libarchive-dev
```

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

- dnf (92%):

```sh
sudo dnf install bsdcat
```

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

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

- pacman (92%):

```sh
sudo pacman -S libarchive
```

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

- zypper (92%):

```sh
sudo zypper install bsdtar
```

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

## Package facts

- **Package key:** brew:libarchive
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/libarchive>
- **Version:** 3.8.8
- **Source summary:** Multi-format archive and compression library
- **Homepage:** <https://www.libarchive.org>
- **Repository:** <https://github.com/libarchive/libarchive>
- **Upstream docs:** <https://github.com/libarchive/libarchive/wiki>
- **License:** BSD-2-Clause
- **Source archive:** <https://www.libarchive.org/downloads/libarchive-3.8.8.tar.xz>
- **Last updated:** 2026-06-24T06:11:28Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- bsdcat (cli)
- bsdcpio (cli)
- bsdtar (cli)
- bsdunzip (cli)
- bsdcat (alias)
- bsdcpio (alias)
- bsdtar (alias)
- bsdunzip (alias)

## Dependencies

- libb2
- lz4
- xz
- zstd

## Uses from macOS

- bzip2
- expat

## 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: 3.8.8
- Package-manager updated: 2026-06-24
- Local data: ok
- Upstream repository: https://www.libarchive.org
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

libarchive is a portable C library and command-line tool suite for reading and writing many archive formats. It ships bsdtar, bsdcpio, bsdcat, and bsdunzip, making it both a developer library and a practical Unix toolbox package.

### Project history

The project began in the FreeBSD orbit and was first released in 2006, according to its own libarchive 3.0 transition notes. Its design emphasized streaming, automatic format detection, and a single API that could handle tar, cpio, zip, ISO images, compression filters, and later many more formats.

### Adoption history

libarchive spread widely because packaging systems, installers, build tools, and OS utilities all need to unpack archives without shelling out to a pile of format-specific programs. Its bsdtar and bsdcpio utilities became FreeBSD-associated alternatives to GNU tar and cpio, while the library itself was packaged across Linux, macOS, BSD, and Windows-oriented environments.

### How it is used

Applications link libarchive to read and write archives through one API, while users run bsdtar, bsdcpio, bsdcat, or bsdunzip. The project site emphasizes automatic handling of archive-plus-compression combinations such as tar.gz and support for POSIX-like systems plus Windows.

### Why package nerds care

libarchive is one of those packages that quietly makes package managers work. Its importance is in boring reliability: many archive formats, many platforms, a test suite, and CLI tools that can replace multiple single-format utilities.

### Timeline

- 2006: libarchive was first released.
- 2011-12: libarchive 3.0 was released after nearly two years of development since 2.8.
- 2016-04-30: libarchive 3.2.0 added bsdcat, LZ4, WARC, raw writer, and ZIP64-related features.
- 2018-09-03: libarchive 3.3.3 included Zstandard read and write filters.
- 2023-07-14: the project recorded a bsdunzip port from FreeBSD in NEWS.

### Related projects

- Related projects include FreeBSD tar and cpio tooling, GNU tar, Info-ZIP, zlib, bzip2, xz, lz4, zstd, archive-consuming package managers, and installers.

### Sources

- <https://github.com/libarchive/libarchive>
- <https://github.com/libarchive/libarchive/blob/master/NEWS>
- <https://github.com/libarchive/libarchive/wiki>
- <https://github.com/libarchive/libarchive/wiki/Libarchive3>
- <https://github.com/libarchive/libarchive/wiki/ReleaseNotes>
- <https://www.libarchive.org>


## Security Notes

library-like package without higher-risk signals.

- **Geiger risk:** green / low
- library-like package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** libarchive
- **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 - libarchive-dev - 3.7.4-4+deb13u1: normalized package name match | Debian stable package indexes: libarchive-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Multi-format archive and compression library (development files) | https://www.libarchive.org/
- Debian apt - libarchive-tools - 3.7.4-4+deb13u1: normalized package name match | Debian stable package indexes: libarchive-tools from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | FreeBSD implementations of 'tar' and 'cpio' and other archive tools | https://www.libarchive.org/
- Debian apt - libarchive13t64 - 3.7.4-4+deb13u1: normalized package name match | Debian stable package indexes: libarchive13t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Multi-format archive and compression library (shared library) | https://www.libarchive.org/
- Nix - libarchive: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libarchive/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libarchive-dev - 3.7.2-2: normalized package name match | Ubuntu 24.04 LTS package indexes: libarchive-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Multi-format archive and compression library (development files) | https://www.libarchive.org/
- Ubuntu apt - libarchive-tools - 3.7.2-2: normalized package name match | Ubuntu 24.04 LTS package indexes: libarchive-tools from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | FreeBSD implementations of 'tar' and 'cpio' and other archive tools | https://www.libarchive.org/
- Ubuntu apt - libarchive13t64 - 3.7.2-2: normalized package name match | Ubuntu 24.04 LTS package indexes: libarchive13t64 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Multi-format archive and compression library (shared library) | https://www.libarchive.org/
- apk - libarchive - 3.8.7-r0: normalized package name match | Alpine Linux edge package indexes: libarchive from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | library that can create and read several streaming archive formats | https://libarchive.org/
- apk - libarchive-dev - 3.8.7-r0: normalized package name match | Alpine Linux edge package indexes: libarchive-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | library that can create and read several streaming archive formats (development files) | https://libarchive.org/
- apk - libarchive-doc - 3.8.7-r0: normalized package name match | Alpine Linux edge package indexes: libarchive-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | library that can create and read several streaming archive formats (documentation) | https://libarchive.org/
- apk - libarchive-static - 3.8.7-r0: normalized package name match | Alpine Linux edge package indexes: libarchive-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | library that can create and read several streaming archive formats (static library) | https://libarchive.org/
- apk - libarchive-tools - 3.8.7-r0: normalized package name match | Alpine Linux edge package indexes: libarchive-tools from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | libarchive tools bsdtar and bsdcpio | https://libarchive.org/
- dnf - bsdcat - 3.8.7-1.fc45: normalized package name match | Fedora Rawhide package metadata: bsdcat from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Expand files to standard output | https://www.libarchive.org/
- dnf - bsdcpio - 3.8.7-1.fc45: normalized package name match | Fedora Rawhide package metadata: bsdcpio from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Copy files to and from archives | https://www.libarchive.org/
- dnf - bsdtar - 3.8.7-1.fc45: normalized package name match | Fedora Rawhide package metadata: bsdtar from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Manipulate tape archives | https://www.libarchive.org/
- dnf - bsdunzip - 3.8.7-1.fc45: normalized package name match | Fedora Rawhide package metadata: bsdunzip from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Extract files from a ZIP archive | https://www.libarchive.org/


## Related links

- [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.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [lz4](https://www.automicvault.com/pkg/brew/lz4/) - Runtime dependency declared by Homebrew.
- [xz](https://www.automicvault.com/pkg/brew/xz/) - Runtime dependency declared by Homebrew.
- [zstd](https://www.automicvault.com/pkg/brew/zstd/) - Runtime dependency declared by Homebrew.
- [appstream-glib](https://www.automicvault.com/pkg/brew/appstream-glib/) - Popular package that depends on this formula.
- [archivemount](https://www.automicvault.com/pkg/brew/archivemount/) - Popular package that depends on this formula.
- [diffoscope](https://www.automicvault.com/pkg/brew/diffoscope/) - Popular package that depends on this formula.
- [dwarfs](https://www.automicvault.com/pkg/brew/dwarfs/) - Popular package that depends on this formula.
- [evince](https://www.automicvault.com/pkg/brew/evince/) - Popular package that depends on this formula.
- [far2l-tty](https://www.automicvault.com/pkg/brew/far2l-tty/) - Popular package that depends on this formula.
- [fceux](https://www.automicvault.com/pkg/brew/fceux/) - Popular package that depends on this formula.
- [ffmpeg-full](https://www.automicvault.com/pkg/brew/ffmpeg-full/) - Popular package that depends on this formula.
- [zip](https://www.automicvault.com/pkg/brew/zip/) - Shares av.db curated category or tags: archive, cli, compression, developer-tools, zip.
- [advancecomp](https://www.automicvault.com/pkg/brew/advancecomp/) - Shares av.db curated category or tags: cli, compression, developer-tools, zip.
- [ancient](https://www.automicvault.com/pkg/brew/ancient/) - Shares av.db curated category or tags: archive, cli, compression, developer-tools, library.
- [libdeflate](https://www.automicvault.com/pkg/brew/libdeflate/) - Shares av.db curated category or tags: cli, compression, developer-tools, library.
- [makeself](https://www.automicvault.com/pkg/brew/makeself/) - Shares av.db curated category or tags: cli, compression, developer-tools, tar.
- [py7zr](https://www.automicvault.com/pkg/brew/py7zr/) - Shares av.db curated category or tags: archive, cli, compression, developer-tools.
- [ada-url](https://www.automicvault.com/pkg/brew/ada-url/) - Shares av.db curated category or tags: cli, developer-tools, library.
- [apr](https://www.automicvault.com/pkg/brew/apr/) - Shares av.db curated category or tags: cli, developer-tools, library.
- [wandio](https://www.automicvault.com/pkg/brew/wandio/) - Local package facts share a topical domain. Shared terms: cli, compression, developer, developer-tools, libraries.
- [pixz](https://www.automicvault.com/pkg/brew/pixz/) - Local package facts share a topical domain. Shared terms: archive, cli, compression, developer, developer-tools.
- [micromamba](https://www.automicvault.com/pkg/brew/micromamba/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, libarchive, lz4.

## Combined YAML source

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