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

Low-level cryptographic library. Version 4.0 via Homebrew; verified 2026-05-11.

## Install

```sh
sudo av install brew:nettle
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install nettle
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install nettle
```

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

### Linux

- apk (92%):

```sh
sudo apk add nettle
```

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

- Debian apt (92%):

```sh
sudo apt install libhogweed6t64
```

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

- dnf (92%):

```sh
sudo dnf install nettle
```

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

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

- pacman (92%):

```sh
sudo pacman -S nettle
```

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

- zypper (92%):

```sh
sudo zypper install nettle
```

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

## Package facts

- **Package key:** brew:nettle
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/nettle>
- **Version:** 4.0
- **Source summary:** Low-level cryptographic library
- **Homepage:** <https://www.lysator.liu.se/~nisse/nettle/>
- **Repository:** <https://git.lysator.liu.se/nettle/nettle>
- **Upstream docs:** <https://www.lysator.liu.se/~nisse/nettle/nettle.html>
- **License:** GPL-2.0-or-later OR LGPL-3.0-or-later
- **Source archive:** <https://ftpmirror.gnu.org/gnu/nettle/nettle-4.0.tar.gz>
- **Last updated:** 2026-05-11T18:07:37Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- nettle-hash (cli)
- nettle-lfib-stream (cli)
- nettle-pbkdf2 (cli)
- pkcs1-conv (cli)
- sexp-conv (cli)
- nettle-hash (alias)
- nettle-lfib-stream (alias)
- nettle-pbkdf2 (alias)
- pkcs1-conv (alias)
- sexp-conv (alias)

## Dependencies

- gmp

## 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: 4.0
- Package-manager updated: 2026-05-11
- Local data: ok
- Upstream repository: https://www.lysator.liu.se/~nisse/nettle/
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

Nettle is a low-level C cryptographic library by Niels Moller. Its design goal is deliberately narrow: provide reusable primitive implementations and simple interfaces while leaving algorithm selection, memory allocation, I/O, and higher-level protocol policy to callers.

### Project history

The Nettle manual says the library is meant to fit many contexts, including object-oriented language toolkits, applications such as LSH or GnuPG, and even kernel space. It explains the core design by saying Nettle does the low-level crypto work and avoids algorithm selection, memory allocation, and I/O so higher-level toolkits can build their own interfaces on top.

Niels Moller's June 30, 2009 GNU announcement says Nettle 2.0 had been released on June 8, 2009 and that Nettle had become a GNU package. The same announcement highlights the 2.0 ABI break that split the library into libnettle for symmetric algorithms and libhogweed for public-key algorithms that depend on GMP.

The upstream GitLab tags show the later 3.x and 4.x release cadence: 3.10 on June 16, 2024, 3.10.2 on June 26, 2025, and 4.0 on February 4, 2026. Homebrew's nettle formula tracked stable 4.0 from the GNU mirror and depends on GMP.

### Adoption history

Nettle's ecosystem role is much larger than its command-line tools suggest. The GnuTLS manual says its cryptographic library layer supports libnettle, and notes that older GnuTLS versions used libgcrypt before switching to nettle mainly for performance and secondarily because it was simpler to use.

Package-manager adoption is broad: the av.db input records Nettle across Homebrew, Alpine, Debian/Ubuntu via libhogweed, Fedora, MacPorts, Nix, Arch, and openSUSE. Homebrew analytics generated on 2026-07-01 reported 780,093 nettle installs over 365 days, but only 8,600 installs-on-request, which is classic library behavior: most installs arrive as dependencies.

### How it is used

Application developers include headers such as nettle/sha2.h and link with -lnettle for symmetric/hash code, or use libhogweed for public-key functionality that depends on GMP. The manual's SHA256 example demonstrates the intended low-level style: explicit context structs, caller-managed buffers, explicit lengths, and no hidden allocation.

End users usually meet Nettle through dependent software rather than by typing its bundled commands. The Homebrew formula exposes tools such as nettle-hash, nettle-pbkdf2, pkcs1-conv, sexp-conv, and nettle-lfib-stream, but its practical importance is as a crypto backend for TLS/security stacks and other packages.

### Why package nerds care

Nettle is a package nerd's dependency graph landmark. It is small enough to audit as a C library, old enough to have stable ABI expectations, and important enough that a major version line matters to large formula rebuilds. The libnettle/libhogweed split is also a clean example of packaging ABI boundaries following real dependency boundaries.

### Timeline

- 2001: The manual-history sources identify Nettle as originally written by Niels Moller in the early 2000s.
- 2009-06-08: Nettle 2.0 was released.
- 2009-06-30: Nettle was announced as a GNU package.
- 2024-06-16: Upstream tagged Nettle 3.10.
- 2025-06-26: Upstream tagged Nettle 3.10.2.
- 2026-02-04: Upstream tagged Nettle 4.0.
- 2026-07-01: Homebrew API reported stable version 4.0 and 780,093 installs over 365 days.

### Sources

- <https://formulae.brew.sh/api/formula/nettle.json>
- <https://git.lysator.liu.se/nettle/nettle/-/tags>
- <https://lists.gnu.org/archive/html/info-gnu/2009-07/msg00000.html>
- <https://www.gnutls.org/manual/html_node/Cryptographic-Backend.html>
- <https://www.lysator.liu.se/~nisse/nettle/>
- <https://www.lysator.liu.se/~nisse/nettle/nettle.html>


## Security Notes

No matching local secret-handling manifest was found for nettle. Nucleus package metadata is still published here so future coverage has a stable package URL.


## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** nettle
- **Aliases:** libnettle, nettle@4
- **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 - libhogweed6t64 - 3.10.1-1: normalized package name match | Debian stable package indexes: libhogweed6t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | low level cryptographic library (public-key cryptos) | https://www.lysator.liu.se/~nisse/nettle/
- Debian apt - libnettle8t64 - 3.10.1-1: normalized package name match | Debian stable package indexes: libnettle8t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | low level cryptographic library (symmetric and one-way cryptos) | https://www.lysator.liu.se/~nisse/nettle/
- Debian apt - nettle-bin - 3.10.1-1: normalized package name match | Debian stable package indexes: nettle-bin from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | low level cryptographic library (binary tools) | https://www.lysator.liu.se/~nisse/nettle/
- Debian apt - nettle-dev - 3.10.1-1: normalized package name match | Debian stable package indexes: nettle-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | low level cryptographic library (development files) | https://www.lysator.liu.se/~nisse/nettle/
- Nix - nettle: normalized package name match | nixpkgs package indexes: nettle from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - libhogweed6t64 - 3.9.1-2.2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libhogweed6t64 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | low level cryptographic library (public-key cryptos) | http://www.lysator.liu.se/~nisse/nettle/
- Ubuntu apt - libnettle8t64 - 3.9.1-2.2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libnettle8t64 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | low level cryptographic library (symmetric and one-way cryptos) | http://www.lysator.liu.se/~nisse/nettle/
- Ubuntu apt - nettle-bin - 3.9.1-2.2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: nettle-bin from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | low level cryptographic library (binary tools) | http://www.lysator.liu.se/~nisse/nettle/
- Ubuntu apt - nettle-dev - 3.9.1-2.2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: nettle-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | low level cryptographic library (development files) | http://www.lysator.liu.se/~nisse/nettle/
- apk - nettle - 3.10.2-r0: normalized package name match | Alpine Linux edge package indexes: nettle from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Low-level cryptographic library | https://www.lysator.liu.se/~nisse/nettle/
- apk - nettle-dev - 3.10.2-r0: normalized package name match | Alpine Linux edge package indexes: nettle-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Low-level cryptographic library (development files) | https://www.lysator.liu.se/~nisse/nettle/
- apk - nettle-static - 3.10.2-r0: normalized package name match | Alpine Linux edge package indexes: nettle-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Low-level cryptographic library (static library) | https://www.lysator.liu.se/~nisse/nettle/
- apk - nettle-utils - 3.10.2-r0: normalized package name match | Alpine Linux edge package indexes: nettle-utils from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Utils for nettle | https://www.lysator.liu.se/~nisse/nettle/
- dnf - nettle - 3.10.1-3.fc44: normalized package name match | Fedora Rawhide package metadata: nettle from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | A low-level cryptographic library | http://www.lysator.liu.se/~nisse/nettle/
- dnf - nettle-devel - 3.10.1-3.fc44: normalized package name match | Fedora Rawhide package metadata: nettle-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development headers for a low-level cryptographic library | http://www.lysator.liu.se/~nisse/nettle/
- pacman - nettle - 4.0-1: normalized package name match | Arch Linux sync databases: nettle from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz | A low-level cryptographic library | https://www.lysator.liu.se/~nisse/nettle


## 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.
- [chrony](https://www.automicvault.com/pkg/brew/chrony/) - Popular package that depends on this formula.
- [claws-mail](https://www.automicvault.com/pkg/brew/claws-mail/) - Popular package that depends on this formula.
- [gnutls](https://www.automicvault.com/pkg/brew/gnutls/) - Popular package that depends on this formula.
- [gstreamer](https://www.automicvault.com/pkg/brew/gstreamer/) - Popular package that depends on this formula.
- [hopenpgp-tools](https://www.automicvault.com/pkg/brew/hopenpgp-tools/) - Popular package that depends on this formula.
- [openconnect](https://www.automicvault.com/pkg/brew/openconnect/) - Popular package that depends on this formula.
- [opendht](https://www.automicvault.com/pkg/brew/opendht/) - Popular package that depends on this formula.
- [rdfind](https://www.automicvault.com/pkg/brew/rdfind/) - Popular package that depends on this formula.
- [sqlcipher](https://www.automicvault.com/pkg/brew/sqlcipher/) - Shares av.db curated category or tags: cli, cryptography, encryption, security.
- [botan](https://www.automicvault.com/pkg/brew/botan/) - Shares av.db curated category or tags: cli, cryptography, security.
- [ccrypt](https://www.automicvault.com/pkg/brew/ccrypt/) - Shares av.db curated category or tags: cli, cryptography, encryption, security.
- [mbedtls](https://www.automicvault.com/pkg/brew/mbedtls/) - Shares av.db curated category or tags: c-library, cli, cryptography, security.
- [nss](https://www.automicvault.com/pkg/brew/nss/) - Shares av.db curated category or tags: cli, cryptography, security.
- [opensc](https://www.automicvault.com/pkg/brew/opensc/) - Shares av.db curated category or tags: cli, cryptography, security.
- [rnp](https://www.automicvault.com/pkg/brew/rnp/) - Shares av.db curated category or tags: cli, cryptography, security.

## Combined YAML source

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