# Install libcap with Homebrew, apk, dnf, Nix, pacman, zypper

User-space interfaces to POSIX 1003.1e capabilities. Version 2.78 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:libcap
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install libcap
```

  Evidence: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add libcap
```

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

- dnf (92%):

```sh
sudo dnf install captree
```

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

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

- pacman (92%):

```sh
sudo pacman -S libcap
```

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

- zypper (92%):

```sh
sudo zypper install libcap-devel
```

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

## Package facts

- **Package key:** brew:libcap
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/libcap>
- **Version:** 2.78
- **Source summary:** User-space interfaces to POSIX 1003.1e capabilities
- **Homepage:** <https://sites.google.com/site/fullycapable/>
- **Repository:** <https://git.kernel.org/pub/scm/libs/libcap/libcap.git>
- **Upstream docs:** <https://sites.google.com/site/fullycapable>
- **License:** BSD-3-Clause AND GPL-2.0-or-later
- **Source archive:** <https://mirrors.edge.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.78.tar.xz>
- **Generated:** 2026-07-09T07:20:21+00:00

## Executables

- capsh (cli)
- getcap (cli)
- getpcaps (cli)
- setcap (cli)
- capsh (alias)
- getcap (alias)
- getpcaps (alias)
- setcap (alias)

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, x86_64_linux

## Freshness

- Page generated: 2026-07-09
- Package-manager version: 2.78
- Local data: ok
- Upstream repository: https://sites.google.com/site/fullycapable/
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

libcap is Andrew G. Morgan's user-space library and utility suite for Linux capabilities, including setcap, getcap, getpcaps, capsh, pam_cap, and related support libraries.

### Project history

The upstream README describes libcap as a library for getting and setting POSIX.1e draft 15 capabilities, with native C/C++ and Go support. The Fully Capable site frames Linux capabilities as an alternative to the superuser model of privilege under Linux and notes that the Linux implementation is based on the defunct POSIX.1e draft.

The project grew beyond a C library into a family of privilege-management tools and helper code. The README names capsh, getpcaps, setcap, and getcap as example programs, while the Fully Capable site documents libpsx for POSIX semantics in threaded applications and Go packages for capability manipulation.

### Adoption history

libcap became baseline Linux security infrastructure because file capabilities and process capabilities need user-space tooling. Distribution packages expose its command-line tools for administrators and its headers and library for software that must drop root while keeping only specific privileges.

### How it is used

Administrators use setcap and getcap to assign and inspect file capabilities, getpcaps to inspect processes, and capsh to experiment with capability sets and shells. Developers link libcap when applications need direct control over Linux capability state.

### Why package nerds care

libcap is one of the packages that turns a kernel security feature into everyday packaging policy. Without it, downstream maintainers have a harder time replacing setuid-root patterns with smaller capability grants.

### Timeline

- POSIX.1e draft 15: Upstream README identifies this draft as the capabilities model libcap targets.
- 2024-05-18: kernel.org refs list libcap 2.70 tags.
- 2024-10-25: kernel.org refs list libcap 2.71 tags.
- 2025-03-04: kernel.org refs list libcap 2.75 tags.
- 2026-04-05: kernel.org refs list libcap 2.78 tags.

### Related projects

- Related projects include the Linux kernel capability implementation, libcap-ng, libpsx, pam_cap, Go cap and psx packages, and distribution packaging that replaces setuid-root usage with file capabilities.

### Sources

- <https://formulae.brew.sh/formula/libcap>
- <https://git.kernel.org/pub/scm/libs/libcap/libcap.git>
- <https://git.kernel.org/pub/scm/libs/libcap/libcap.git/plain/CHANGELOG>
- <https://git.kernel.org/pub/scm/libs/libcap/libcap.git/plain/README>
- <https://git.kernel.org/pub/scm/libs/libcap/libcap.git/refs/tags>
- <https://sites.google.com/site/fullycapable>


## 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:** libcap
- **Version Scheme:** 0
- **Revision:** 0
- **Requirements:** linux
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Nix - libcap: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libcap/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - libcap - 2.78-r0: normalized package name match | Alpine Linux edge package indexes: libcap from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | POSIX 1003.1e capabilities | https://sites.google.com/site/fullycapable/
- apk - libcap-dev - 2.78-r0: normalized package name match | Alpine Linux edge package indexes: libcap-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | POSIX 1003.1e capabilities (development files) | https://sites.google.com/site/fullycapable/
- apk - libcap-doc - 2.78-r0: normalized package name match | Alpine Linux edge package indexes: libcap-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | POSIX 1003.1e capabilities (documentation) | https://sites.google.com/site/fullycapable/
- apk - libcap-getcap - 2.78-r0: normalized package name match | Alpine Linux edge package indexes: libcap-getcap from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | POSIX 1003.1e capabilities (getcap utility) | https://sites.google.com/site/fullycapable/
- apk - libcap-setcap - 2.78-r0: normalized package name match | Alpine Linux edge package indexes: libcap-setcap from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | POSIX 1003.1e capabilities (setcap utility) | https://sites.google.com/site/fullycapable/
- apk - libcap-static - 2.78-r0: normalized package name match | Alpine Linux edge package indexes: libcap-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | POSIX 1003.1e capabilities (static library) | https://sites.google.com/site/fullycapable/
- apk - libcap-utils - 2.78-r0: normalized package name match | Alpine Linux edge package indexes: libcap-utils from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | POSIX 1003.1e capabilities (extra utils) | https://sites.google.com/site/fullycapable/
- apk - libcap2 - 2.78-r0: normalized package name match | Alpine Linux edge package indexes: libcap2 from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | POSIX 1003.1e capabilities (libraries) | https://sites.google.com/site/fullycapable/
- dnf - captree - 2.78-1.fc45: normalized package name match | Fedora Rawhide package metadata: captree from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Capability inspection utility | https://sites.google.com/site/fullycapable/
- dnf - libcap - 2.78-1.fc45: normalized package name match | Fedora Rawhide package metadata: libcap from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Library for getting and setting POSIX.1e capabilities | https://sites.google.com/site/fullycapable/
- dnf - libcap-devel - 2.78-1.fc45: normalized package name match | Fedora Rawhide package metadata: libcap-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development files for libcap | https://sites.google.com/site/fullycapable/
- dnf - libcap-static - 2.78-1.fc45: normalized package name match | Fedora Rawhide package metadata: libcap-static from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Static libraries for libcap development | https://sites.google.com/site/fullycapable/
- pacman - libcap - 2.78-1: normalized package name match | Arch Linux sync databases: libcap from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz | POSIX 1003.1e capabilities | https://sites.google.com/site/fullycapable/
- zypper - libcap-devel - 2.78-1.2: normalized package name match | openSUSE Tumbleweed package metadata: libcap-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Development files for libcap | https://sites.google.com/site/fullycapable/
- zypper - libcap-progs - 2.78-1.2: normalized package name match | openSUSE Tumbleweed package metadata: libcap-progs from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Libcap utility programs | https://sites.google.com/site/fullycapable/


## 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.
- [Security and crypto packages](https://www.automicvault.com/pkg/security-crypto-tools/) - Matched security, identity, cryptography, password, signing, or certificate metadata.
- [Homebrew utility packages](https://www.automicvault.com/pkg/brew-utility-packages/) - Matched Homebrew package provider.
- [avahi](https://www.automicvault.com/pkg/brew/avahi/) - Popular package that depends on this formula.
- [bubblewrap](https://www.automicvault.com/pkg/brew/bubblewrap/) - Popular package that depends on this formula.
- [crun](https://www.automicvault.com/pkg/brew/crun/) - Popular package that depends on this formula.
- [iproute2](https://www.automicvault.com/pkg/brew/iproute2/) - Popular package that depends on this formula.
- [slirp4netns](https://www.automicvault.com/pkg/brew/slirp4netns/) - Popular package that depends on this formula.
- [systemd](https://www.automicvault.com/pkg/brew/systemd/) - Popular package that depends on this formula.
- [libcap-ng](https://www.automicvault.com/pkg/brew/libcap-ng/) - Shares av.db curated category or tags: cli, library, linux, linux-capabilities, permissions.
- [botan](https://www.automicvault.com/pkg/brew/botan/) - Shares av.db curated category or tags: cli, library, security.
- [cracklib](https://www.automicvault.com/pkg/brew/cracklib/) - Shares av.db curated category or tags: cli, library, security.
- [cyrus-sasl](https://www.automicvault.com/pkg/brew/cyrus-sasl/) - Shares av.db curated category or tags: cli, library, security.
- [gnutls](https://www.automicvault.com/pkg/brew/gnutls/) - Shares av.db curated category or tags: cli, library, security.
- [linux-pam](https://www.automicvault.com/pkg/brew/linux-pam/) - Shares av.db curated category or tags: cli, linux, security.
- [opensaml](https://www.automicvault.com/pkg/brew/opensaml/) - Shares av.db curated category or tags: cli, library, security.
- [opensc](https://www.automicvault.com/pkg/brew/opensc/) - Shares av.db curated category or tags: cli, library, security.

## Combined YAML source

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