# Install tdb with Homebrew, apk, MacPorts, Nix, pacman, apt, zypper

Trivial DataBase, by the Samba project. Version 1.4.15 via Homebrew; verified 2026-04-18.

## Install

```sh
sudo av install brew:tdb
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install tdb
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install tdb
```

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

### Linux

- apk (92%):

```sh
sudo apk add py3-tdb
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#tdb
```

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

- pacman (92%):

```sh
sudo pacman -S tdb
```

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

- Ubuntu apt (92%):

```sh
sudo apt install libtdb-dev
```

  Evidence: Ubuntu 24.04 LTS package indexes: libtdb-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz

- zypper (92%):

```sh
sudo zypper install libtdb-devel
```

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

## Package facts

- **Package key:** brew:tdb
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/tdb>
- **Version:** 1.4.15
- **Source summary:** Trivial DataBase, by the Samba project
- **Homepage:** <https://tdb.samba.org/>
- **Repository:** <https://git.samba.org/samba.git>
- **Upstream docs:** <https://tdb.samba.org/>
- **License:** LGPL-3.0-or-later AND GPL-3.0-or-later
- **Source archive:** <https://www.samba.org/ftp/tdb/tdb-1.4.15.tar.gz>
- **Last updated:** 2026-04-18T13:11:00-04:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- tdbbackup (cli)
- tdbdump (cli)
- tdbrestore (cli)
- tdbtool (cli)
- tdbbackup (alias)
- tdbdump (alias)
- tdbrestore (alias)
- tdbtool (alias)

## 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: 1.4.15
- Package-manager updated: 2026-04-18
- Local data: ok
- Upstream repository: https://tdb.samba.org/
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

tdb, the Trivial DataBase from the Samba project, is a small embedded key-value database library and set of command-line utilities. Samba's own documentation says it grew out of several ad hoc database-like components inside Samba and was designed as a compact alternative inspired by gdbm.

### Project history

The official TDB documentation explains the origin directly: Samba had multiple ad hoc pieces of code that shared structures between parts of Samba, and TDB consolidated that need into a simple database API. Its interface was based on gdbm, but gdbm was not suitable for Samba's requirement that multiple writers be able to use a database at the same time.

The API documentation describes TDB as conceptually similar to GDBM and BSD DB, but smaller and with internal locking for concurrent writers. It includes common database operations such as open, fetch, store, delete, traverse, transactions, locking, and consistency checks.

### Adoption history

TDB's adoption is tied to Samba itself and to operating-system packaging of Samba-related libraries and tools. The supplied package-manager facts show it available across Homebrew, MacPorts, Nix, Arch, Ubuntu/Debian, Alpine, and openSUSE ecosystems, often as libtdb development packages or Python bindings.

### How it is used

TDB is used as a local embedded database library, and its command-line tools include `tdbtool`, `tdbdump`, `tdbbackup`, and `tdbrestore`. Samba's documentation notes that `tdbtool` allows simple command-line manipulation of databases, while the API is aimed at programs that need small, locked, file-backed databases.

### Why package nerds care

For package maintainers, TDB is notable because it is not just an end-user command: it is infrastructure shipped as libraries, headers, Python bindings, and maintenance tools. Its presence in many package sets reflects Samba's long tail of reusable C libraries and the need for consistent ABI packaging across Unix-like systems.

### Timeline

- 1.2.9: Official Doxygen documentation describes TDB as a Samba-origin simple database API.
- Current Samba tree: TDB lives under `lib/tdb` in the official Samba source repository.

### Related projects

- Samba documentation explicitly compares TDB with gdbm and BSD DB.
- TDB is distributed from Samba's source archive and source tree alongside other standalone Samba libraries.

### Sources

- <https://git.samba.org/?p=samba.git;a=tree;f=lib/tdb>
- <https://tdb.samba.org/>
- <https://tdb.samba.org/group__tdb.html>
- 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:** tdb
- **Version Scheme:** 0
- **Revision:** 0
- **Conflicts With:** jena
- **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 - tdb: normalized package name match | nixpkgs package indexes: pkgs/by-name/td/tdb/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libtdb-dev - 1.4.10-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libtdb-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Trivial Database - development files | https://tdb.samba.org/
- Ubuntu apt - libtdb1 - 1.4.10-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libtdb1 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Trivial Database - shared library | https://tdb.samba.org/
- Ubuntu apt - python3-tdb - 1.4.10-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: python3-tdb from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Python3 bindings for TDB | https://tdb.samba.org/
- Ubuntu apt - tdb-tools - 1.4.10-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: tdb-tools from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Trivial Database - bundled binaries | https://tdb.samba.org/
- apk - py3-tdb - 1.4.15-r1: normalized package name match | Alpine Linux edge package indexes: py3-tdb from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Python 3 binding for the tdb library | https://tdb.samba.org/
- apk - tdb - 1.4.15-r1: normalized package name match | Alpine Linux edge package indexes: tdb from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | The tdb library | https://tdb.samba.org/
- apk - tdb-dev - 1.4.15-r1: normalized package name match | Alpine Linux edge package indexes: tdb-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | The tdb library (development files) | https://tdb.samba.org/
- apk - tdb-doc - 1.4.15-r1: normalized package name match | Alpine Linux edge package indexes: tdb-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | The tdb library (documentation) | https://tdb.samba.org/
- apk - tdb-libs - 1.4.15-r1: normalized package name match | Alpine Linux edge package indexes: tdb-libs from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | The tdb library (libraries) | https://tdb.samba.org/
- pacman - tdb - 1.4.15-1: normalized package name match | Arch Linux sync databases: tdb from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Trivial Database similar to GDBM but allows simultaneous commits | https://tdb.samba.org/
- zypper - libtdb-devel - 1.4.15-1.1: normalized package name match | openSUSE Tumbleweed package metadata: libtdb-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Libraries and Header Files to Develop Programs with tdb1 Support | https://tdb.samba.org/
- zypper - libtdb1 - 1.4.15-1.1: normalized package name match | openSUSE Tumbleweed package metadata: libtdb1 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Samba Trivial Database | https://tdb.samba.org/
- zypper - libtdb1-32bit - 1.4.15-1.1: normalized package name match | openSUSE Tumbleweed package metadata: libtdb1-32bit from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Samba Trivial Database | https://tdb.samba.org/
- zypper - python3-tdb - 1.4.15-1.1: normalized package name match | openSUSE Tumbleweed package metadata: python3-tdb from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Python3 bindings for the Tdb library | https://tdb.samba.org/
- zypper - python3-tdb-32bit - 1.4.15-1.1: normalized package name match | openSUSE Tumbleweed package metadata: python3-tdb-32bit from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Python3 bindings for the Tdb library | https://tdb.samba.org/


## 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.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [samba](https://www.automicvault.com/pkg/brew/samba/) - Popular package that depends on this formula.
- [berkeley-db](https://www.automicvault.com/pkg/brew/berkeley-db/) - Shares av.db curated category or tags: cli, data, database, embedded-database, key-value-store.
- [lmdb](https://www.automicvault.com/pkg/brew/lmdb/) - Shares av.db curated category or tags: cli, data, database, embedded-database, key-value-store.
- [qdbm](https://www.automicvault.com/pkg/brew/qdbm/) - Shares av.db curated category or tags: c-library, cli, data, database, key-value-store.
- [tkrzw](https://www.automicvault.com/pkg/brew/tkrzw/) - Shares av.db curated category or tags: cli, data, database, embedded-database, key-value-store.
- [dbxml](https://www.automicvault.com/pkg/brew/dbxml/) - Shares av.db curated category or tags: cli, data, database, embedded-database.
- [derby](https://www.automicvault.com/pkg/brew/derby/) - Shares av.db curated category or tags: cli, data, database, embedded-database.
- [ejdb](https://www.automicvault.com/pkg/brew/ejdb/) - Shares av.db curated category or tags: cli, data, database, embedded-database.
- [gdbm](https://www.automicvault.com/pkg/brew/gdbm/) - Shares av.db curated category or tags: cli, data, database, embedded-database.

## Combined YAML source

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