XBPS

Also known as: X Binary Package System

On this page 7

XBPS, the X Binary Package System, is the native binary package manager of Void Linux, written in C and designed for speed, transactional installs and shared library aware dependency tracking. In Linux Package management, it occupies the same role that APT holds on Debian or Pacman on Arch, but it was developed independently with its own formats and tools.

XBPS consists of a library, libxbps, and a set of small utilities whose names all begin with xbps-. It is paired with xbps-src, a source build system that turns package templates into binary packages, so the same project covers both building and installing software.

How XBPS installs and tracks packages

XBPS installs software from signed binary packages with the .xbps extension, which are compressed archives containing files and a metadata property list. Before any transaction, the client downloads a repository index called repodata, which lists every available package, its version and its dependencies.

Installed state lives in the package database, a property list file under /var/db/xbps. A transaction resolves dependencies, downloads packages into /var/cache/xbps, verifies RSA signatures and checksums, unpacks files, runs install scripts and finally updates the database. If a step fails before unpacking, nothing on disk is changed.

A distinctive feature is shlib tracking. Each package records the shared libraries it provides (shlib-provides) and needs (shlib-requires), so XBPS can refuse an update that would remove a library another package still links to. This prevents a class of breakage that plain version constraints miss.

XBPS also supports virtual packages, where several real packages satisfy one abstract name, and an alternatives mechanism that switches symbolic links between providers of the same command, such as different implementations of sh or awk. Both features let users replace core components without breaking dependents.

The XBPS utilities and their roles

XBPS follows a one task per utility design rather than one large command with many modes. The most frequently used utilities are listed in the following table.

UtilityPurposeTypical invocation
xbps-installInstall, update and sync repositoriesxbps-install -Su
xbps-removeRemove packages, orphans and cachexbps-remove -R pkg
xbps-querySearch and inspect packagesxbps-query -Rs term
xbps-reconfigureRerun configuration scriptsxbps-reconfigure -f pkg
xbps-pkgdbCheck database and set holdsxbps-pkgdb -m hold pkg
xbps-alternativesSwitch between alternative providersxbps-alternatives -l
xbps-rindexCreate and sign repository indexesxbps-rindex -a *.xbps
Core XBPS utilities

Configuration is read from /usr/share/xbps.d/ for distribution defaults and from /etc/xbps.d/ for local overrides, where a file with the same name takes precedence. Repository mirrors, ignored packages and virtual package preferences are all set there.

XBPS compared with other package managers

XBPS sits between minimalist tools such as Pacman and feature-rich stacks such as APT with dpkg. The comparison below highlights the differences most relevant to administrators.

AspectXBPSAPT and dpkgPacman
DistributionVoid LinuxDebian, UbuntuArch Linux
Metadata formatProperty listsControl filesPlain text database
Library dependency checkBuilt-in shlib trackingVia shlibs and symbols filesVia soname dependencies
Source build toolxbps-srcdpkg-buildpackagemakepkg with PKGBUILD
C library variantsglibc and muslglibcglibc
Release modelRollingFixed releasesRolling
XBPS compared with APT and Pacman

The musl support is notable: Void Linux publishes separate repositories for glibc and musl builds, and XBPS handles both with the same tooling. Package names stay identical, while the architecture string, such as x86_64-musl, selects the correct repository.

XBPS is not limited to Void Linux in principle. The tools can install packages into an alternative root directory with the -r option, which administrators use to bootstrap a new Void system from another distribution or to populate a container image without running a full installer.

Repositories, signing and xbps-src

Void Linux packages are built from templates in the void-packages repository by xbps-src, which compiles each package inside an isolated build root to keep host libraries out of the result. Official builders then sign the output and publish it to mirrors.

RepositoryContentsWhen it is needed
MainFree software for the base architectureAlways
NonfreeSoftware with restrictive licensesProprietary drivers or firmware
Multilib32-bit libraries on 64-bit glibcOlder binaries or games
DebugSeparated debugging symbolsAnalyzing crashes
LocalPackages built with xbps-srcRestricted or custom software
Repository types used with XBPS

On the first sync from a repository, XBPS asks the user to import the repository public key and shows its fingerprint. After that, any package that fails signature verification is rejected. Some packages are marked restricted because their licenses forbid redistribution, so users must build them locally with xbps-src.

Practical rules and common mistakes

Because Void Linux is a rolling release, XBPS assumes the whole system moves forward together. Partial upgrades are unsupported, and most problems reported by new users trace back to ignoring that rule.

SymptomCauseFix
Install fails with shlib errorsOutdated system with new packageRun a full xbps-install -Su first
Update demands xbps firstPackage manager itself is outdatedRun xbps-install -u xbps, then update
Disk fills over timePackage cache is never cleanedRun xbps-remove -O
Unused libraries remainOrphaned dependenciesRun xbps-remove -o
Service config not appliedPost-install script skippedRun xbps-reconfigure -f pkg
Frequent XBPS problems and fixes

Holding a package with xbps-pkgdb -m hold is possible, but long-term holds conflict with shlib tracking and eventually block updates of dependent packages. Holds work best as a short pause while a regression is investigated.

The idea in brief

XBPS is the app store of Void Linux, operated from the command line. It downloads ready-made programs, checks that they really come from the distribution, installs them and keeps a record of what is on the computer.

Its special strength is that it notices when one program still needs a shared building block that an update would take away. It stops the update instead of leaving a broken program behind, which keeps the system consistent.

A practical scenario

A small hosting provider runs Void Linux with musl on lightweight containers for static websites. An administrator wants to add a new image optimization tool and runs xbps-install -S tool, but XBPS stops with an unresolved shared library error, because the tool was built against a newer image library than the one installed.

Instead of forcing the install, the administrator runs xbps-install -Su, which first updates XBPS itself and then upgrades the rest of the system, including the library. The tool then installs cleanly. Afterward, xbps-remove -Oo clears about 600 MB of cached and orphaned packages, and the change is copied into the container build script so that every new container starts fully updated.