XBPS package manager

created onAugust 19, 2025

Instead of a single program, the XBPS package manager consists of a collection of 15 programs at the time of writing. For the usual installation and maintenance of a Void Linux system, these are the four most relevant ones:

  • xbps-install to install/reinstall or upgrade packages, to sync the local index of packages with the configured repo/mirror and to perform system updates.
  • xbps-pkgdb to modify the package database. Operations include setting a package ‘on-hold’ to prevent the package from being updated during a system update.
  • xbps-query to list the configured repos and information about installed packages
  • xbps-remove to remove packages.

The remaining 14 programs are intended for package maintainers.

Running any xbps-<whatever> program without any parameter shows a help page with all parameters. These help pages provide enough information in most cases and are more concise than the respective man page.

Additionally, the xtools package provides tools that are usually interesting for package maintainers only, except of the following two tools:

  • xcheckrestart: finds processes running a different version of a program than the version installed. This is useful to find services that have been updated during a system update. XBPS does not automatically restart services after an update.
  • xlocate: works like locate, but for XBPS packages. lists the package(s) that provide file <file>.

XBPS keeps a local index of all packages in the configured repo/mirror.

configuration

Installing Void from a Live-Installer will automatically install the files necessary to configure XBPS:

  • 00-repository-main.conf: configures the repo/mirror for XBPS
  • void-virtualpkgs.conf: defines virtual packages. Virtual packages are resolved to real packages.
  • xbps-arch.conf: defines the architecture for which XBPS installs packages. This file shouldn’t be edited.
  • xbps.conf: contains the default values (commented out) for the XBPS configuration

When installing Void via chroot with the XBPS method (see Installation via chroot), the files in from the installation medium can be copied to .

For both methods, XBPS runs out of the box. However, it is recommended to configure the XBPS mirror to decrease the load on the default mirror and to improve the speed of XBPS.

mirror setup

There are tier 1 mirrors and tier 2 mirrors. tier 1 mirrors usually get synced within an hour or so. Tier 2 mirrors sync from a nearby Tier 1 mirror when possible.

The publicy available grafana dashboard defines out of sync mirrors as “Mirrors, that haven’t synced for at least 5 days”. The topicality of tier 2 mirrors varies a lot, with some tier 2 mirrors being out of sync for weeks or even years.

Before configuring the mirror for XBPS, the topicality of the mirrors should be checked with the mirror list available at Void Linux Mirrors or the grafana dashboard mentioned above.

syncing XBPS with the mirror

To sync XBPS with the mirror and update the index, use .

system update

performs a system update. Before the update operation, XBPS should be synced with the configured mirror with . Both operations can be combined with , except when updating XBPS. In this case, must be run twice, the first time to update XBPS itself, the second time to update the rest of the system.

updates the system without asking questions, assuming ‘yes’ as the answer for any question.

updated services

XBPS does not restart services when they are updated. This task is left to the sysadmin. For finding processes running a different version of a program than the version installed, the xtools package provides

lists the process of any such service, together with its PID, path to executable, status of the path that it was launched from (might be deleted because of an update), and the process name.

can and should be executed by an unprivileged user.

preventing kernel panic after an update

A possible cause for a kernel panic after an update is that there is no space left in because of too much kernel versions installed in there.

A possible strategy to counter this is to pin the package linux (see pinned packages below) and periodically upgrade the kernel manually with after checking the space left in .

installing packages

installs the package .

installing specific package versions

With , specific versions or version ranges of a program can be installed. I.e. with , package banana, version 2.0, is installed, while with , banana, version 2.0 or later is installed.

checking operations with ‘–dry-run’

and have the parameter (or, short: ). With this parameter and do not execute the specified operations but only report them, i.e. reports which packages will be installed as dependencies of package mooh, in addition to package mooh being installed. lists mooh and dependencies that are no longer needed when package mooh is uninstalled and that will be uninstalled together with package ‘mooh’.

getting information about packages

  • lists all installed packages.
  • lists all pinned packages (see pinned packages below).
  • lists all files that package <package> provides.
  • lists all packages that have been installed manually, that is, all packages that have not been installed as a dependency but have been installed explicitly, i.e. with .
  • lists all run-time dependencies of package <package>.
  • lists all packages, for which package is a run-time dependency (lists reverse dependencies of package ).
  • lists all installed packages without their version.
  • prints the version of package <package>.

orphaned packages

list orphaned packages.

the XBPS GitHub page defines orphaned packages as “packages that were installed as dependencies but there is not any package currently that requires it”.

This might include packages that one wants to use independently of the package for which the package was installed as a dependency. Examples are fonts and utility programs that come with certain packages.

I.e., at the time of writing lists on my system, among other stuff, several fonts and programs like ffmpeg, xdpyinfo, which I occasionally use. reports that it will remove all these packages when running .

Be careful not to screw up your system with !

modifying the package db

modifying the package mode

Package have either the package mode auto – the package has been installed as a dependency, or the package mode manual – the package has been installed explicitly by the user. The package mode can be set with , respectively .

Packages in mode manual are not detected as orphaned packages.

This is useful if you want to keep a package B that has been installed as a dependency of another package A, regardless whether package A will be uninstalled at any time. Examples include fonts but also small utility programs that have been installed as dependencies.

pinned packages

Packages can be pinned to their current version (set on hold in XBPS speak) with and can be unpinned with . Pinned packages do not get updated during a system update with .

However, updates a package regardless whether it is pinned or not.

cleaning up the package cache

cleans the cache directory and removes outdated packages and/or packages with wrong hash.

Note the capital -O instead of the lower case -o for removing orphans!

references

man pages of xbps-<whatever> programs

man pages of xtools

Void Linux documentation: XBPS Package Manager

Void Linux documentation: Void Linux Mirrors

XBPS on github: void-linux/xbps

x