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

Library for querying compressed XML metadata. Version 0.3.28 via Homebrew; verified 2026-06-30.

## Install

```sh
sudo av install brew:libxmlb
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install libxmlb
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install libxmlb
```

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

### Linux

- apk (92%):

```sh
sudo apk add libxmlb
```

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

- Debian apt (92%):

```sh
sudo apt install gir1.2-xmlb-2.0
```

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

- dnf (92%):

```sh
sudo dnf install libxmlb
```

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

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

- pacman (92%):

```sh
sudo pacman -S libxmlb
```

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

- zypper (92%):

```sh
sudo zypper install libxmlb-devel
```

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

## Package facts

- **Package key:** brew:libxmlb
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/libxmlb>
- **Version:** 0.3.28
- **Source summary:** Library for querying compressed XML metadata
- **Homepage:** <https://github.com/hughsie/libxmlb>
- **Repository:** <https://github.com/hughsie/libxmlb>
- **Upstream docs:** <https://github.com/hughsie/libxmlb>
- **License:** LGPL-2.1-or-later
- **Source archive:** <https://github.com/hughsie/libxmlb/releases/download/0.3.28/libxmlb-0.3.28.tar.xz>
- **Last updated:** 2026-06-30T16:11:04Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- xb-tool (cli)
- xb-tool (alias)

## Dependencies

- glib
- xz
- zstd

## Build dependencies

- gi-docgen
- gobject-introspection
- meson
- ninja
- pkgconf
- python@3.14
- vala

## 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: 0.3.28
- Package-manager updated: 2026-06-30
- Local data: ok
- Upstream repository: https://github.com/hughsie/libxmlb
- info: No cached GitHub release or tag data was available.
## Project history and usage

libxmlb is a small system library for compiling XML metadata into a binary representation that can be memory-mapped and queried quickly. It is most associated with desktop and firmware metadata workflows where large XML files need repeated lookups.

### Project history

Richard Hughes' README frames the project around the cost of parsing XML and the inability to mmap normal XML strings directly. libxmlb converts XML into a structured binary format with a deduplicated string table and NUL-terminated strings, trading compactness for fast queries and near zero-copy access.

The first visible 0.1.0 GitHub tag points to a commit dated 2018-10-04. The design is intentionally narrow: it implements only a subset of XPath and ships xb-tool for compiling and querying binary XML.

### Adoption history

libxmlb became useful in Linux desktop plumbing because projects such as AppStream and fwupd deal in large XML metadata collections. The same maintainer ecosystem around GNOME, fwupd, and LVFS made the binary metadata cache a practical dependency for package and firmware tooling.

### How it is used

Typical usage is to compile XML metadata into an .xmlb file and query it with xb-tool or through the library API. It is a cache/query accelerator, not a general-purpose XML replacement.

### Why package nerds care

libxmlb matters to package nerds because it sits where package metadata, desktop app metadata, and firmware metadata meet performance constraints. It turns text metadata into a binary cache that package managers and desktop software centers can query cheaply.

### Timeline

- 2018: The 0.1.0 tag points to a commit dated 2018-10-04.
- 2019: AppStream discussions describe LVFS and fwupd as using AppStream metadata for firmware metadata.
- 2020s: libxmlb is packaged across Linux distributions and Homebrew as xb-tool and the libxmlb library.

### Related projects

- fwupd, LVFS, AppStream, GNOME Software, and other metadata-heavy desktop tools are the neighboring ecosystem. libxml2 remains the broader XML library; libxmlb is the binary metadata cache layer.

### Sources

- <https://api.github.com/repos/hughsie/libxmlb/commits/a5878a07a6a1bafce8857be2bb9316fffa9907f3>
- <https://blog.tenstral.net/2020/01/a-big-appstream-status-update.html>
- <https://github.com/hughsie/libxmlb>
- <https://raw.githubusercontent.com/hughsie/libxmlb/main/README.md>


## Security Notes

No matching local secret-handling manifest was found for libxmlb. 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:** libxmlb
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Debian apt - gir1.2-xmlb-2.0 - 0.3.22-1: normalized package name match | Debian stable package indexes: gir1.2-xmlb-2.0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GObject introspection data for libxmlb | https://github.com/hughsie/libxmlb
- Debian apt - libxmlb-dev - 0.3.22-1: normalized package name match | Debian stable package indexes: libxmlb-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Development files for libxmlb | https://github.com/hughsie/libxmlb
- Debian apt - libxmlb-tests - 0.3.22-1: normalized package name match | Debian stable package indexes: libxmlb-tests from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Installed tests for libxmlb2 | https://github.com/hughsie/libxmlb
- Debian apt - libxmlb-utils - 0.3.22-1: normalized package name match | Debian stable package indexes: libxmlb-utils from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Binary XML library - Command-line utility | https://github.com/hughsie/libxmlb
- Debian apt - libxmlb2 - 0.3.22-1: normalized package name match | Debian stable package indexes: libxmlb2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Binary XML library | https://github.com/hughsie/libxmlb
- Nix - libxmlb: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libxmlb/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - gir1.2-xmlb-2.0 - 0.3.18-1: normalized package name match | Ubuntu 24.04 LTS package indexes: gir1.2-xmlb-2.0 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | GObject introspection data for libxmlb | https://github.com/hughsie/libxmlb
- Ubuntu apt - libxmlb-dev - 0.3.18-1: normalized package name match | Ubuntu 24.04 LTS package indexes: libxmlb-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Development files for libxmlb | https://github.com/hughsie/libxmlb
- Ubuntu apt - libxmlb-tests - 0.3.18-1: normalized package name match | Ubuntu 24.04 LTS package indexes: libxmlb-tests from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Installed tests for libxmlb2 | https://github.com/hughsie/libxmlb
- Ubuntu apt - libxmlb-utils - 0.3.18-1: normalized package name match | Ubuntu 24.04 LTS package indexes: libxmlb-utils from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Binary XML library - Command-line utility | https://github.com/hughsie/libxmlb
- Ubuntu apt - libxmlb2 - 0.3.18-1: normalized package name match | Ubuntu 24.04 LTS package indexes: libxmlb2 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Binary XML library | https://github.com/hughsie/libxmlb
- apk - libxmlb - 0.3.27-r0: normalized package name match | Alpine Linux edge package indexes: libxmlb from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Library to help create and query binary XML blobs | https://github.com/hughsie/libxmlb
- apk - libxmlb-dbg - 0.3.27-r0: normalized package name match | Alpine Linux edge package indexes: libxmlb-dbg from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Library to help create and query binary XML blobs (debug symbols) | https://github.com/hughsie/libxmlb
- apk - libxmlb-dev - 0.3.27-r0: normalized package name match | Alpine Linux edge package indexes: libxmlb-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Library to help create and query binary XML blobs (development files) | https://github.com/hughsie/libxmlb
- apk - libxmlb-doc - 0.3.27-r0: normalized package name match | Alpine Linux edge package indexes: libxmlb-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Library to help create and query binary XML blobs (documentation) | https://github.com/hughsie/libxmlb
- dnf - libxmlb - 0.3.27-1.fc45: normalized package name match | Fedora Rawhide package metadata: libxmlb from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Library for querying compressed XML metadata | https://github.com/hughsie/libxmlb


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [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.
- [glib](https://www.automicvault.com/pkg/brew/glib/) - 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.
- [gi-docgen](https://www.automicvault.com/pkg/brew/gi-docgen/) - Build dependency declared by Homebrew.
- [gobject-introspection](https://www.automicvault.com/pkg/brew/gobject-introspection/) - Build dependency declared by Homebrew.
- [meson](https://www.automicvault.com/pkg/brew/meson/) - Build dependency declared by Homebrew.
- [ninja](https://www.automicvault.com/pkg/brew/ninja/) - Build dependency declared by Homebrew.
- [appstream](https://www.automicvault.com/pkg/brew/appstream/) - Popular package that depends on this formula.
- [fwupd](https://www.automicvault.com/pkg/brew/fwupd/) - Popular package that depends on this formula.
- [tag](https://www.automicvault.com/pkg/brew/tag/) - Shares av.db curated category or tags: cli, metadata, query, system.
- [appstream-glib](https://www.automicvault.com/pkg/brew/appstream-glib/) - Shares av.db curated category or tags: cli, metadata, system.
- [augeas](https://www.automicvault.com/pkg/brew/augeas/) - Shares av.db curated category or tags: cli, library, system.
- [cahute](https://www.automicvault.com/pkg/brew/cahute/) - Shares av.db curated category or tags: cli, library, system.
- [chmlib](https://www.automicvault.com/pkg/brew/chmlib/) - Shares av.db curated category or tags: cli, library, system.
- [cpu_features](https://www.automicvault.com/pkg/brew/cpu-features/) - Shares av.db curated category or tags: cli, library, system.
- [cpuid](https://www.automicvault.com/pkg/brew/cpuid/) - Shares av.db curated category or tags: cli, library, system.
- [squashfs](https://www.automicvault.com/pkg/brew/squashfs/) - Local package facts share a topical domain. Shared terms: cli, compressed, system, xz, zstd.

## Combined YAML source

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