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.
| Utility | Purpose | Typical invocation |
|---|---|---|
| xbps-install | Install, update and sync repositories | xbps-install -Su |
| xbps-remove | Remove packages, orphans and cache | xbps-remove -R pkg |
| xbps-query | Search and inspect packages | xbps-query -Rs term |
| xbps-reconfigure | Rerun configuration scripts | xbps-reconfigure -f pkg |
| xbps-pkgdb | Check database and set holds | xbps-pkgdb -m hold pkg |
| xbps-alternatives | Switch between alternative providers | xbps-alternatives -l |
| xbps-rindex | Create and sign repository indexes | xbps-rindex -a *.xbps |
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.
| Aspect | XBPS | APT and dpkg | Pacman |
|---|---|---|---|
| Distribution | Void Linux | Debian, Ubuntu | Arch Linux |
| Metadata format | Property lists | Control files | Plain text database |
| Library dependency check | Built-in shlib tracking | Via shlibs and symbols files | Via soname dependencies |
| Source build tool | xbps-src | dpkg-buildpackage | makepkg with PKGBUILD |
| C library variants | glibc and musl | glibc | glibc |
| Release model | Rolling | Fixed releases | Rolling |
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.
| Repository | Contents | When it is needed |
|---|---|---|
| Main | Free software for the base architecture | Always |
| Nonfree | Software with restrictive licenses | Proprietary drivers or firmware |
| Multilib | 32-bit libraries on 64-bit glibc | Older binaries or games |
| Debug | Separated debugging symbols | Analyzing crashes |
| Local | Packages built with xbps-src | Restricted or custom software |
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.
| Symptom | Cause | Fix |
|---|---|---|
| Install fails with shlib errors | Outdated system with new package | Run a full xbps-install -Su first |
| Update demands xbps first | Package manager itself is outdated | Run xbps-install -u xbps, then update |
| Disk fills over time | Package cache is never cleaned | Run xbps-remove -O |
| Unused libraries remain | Orphaned dependencies | Run xbps-remove -o |
| Service config not applied | Post-install script skipped | Run xbps-reconfigure -f pkg |
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.