XBPS Package Manager - Void Linux Handbook (original) (raw)

  1. 1. About
    1. 1.1. History
    2. 1.2. About This Handbook
    3. 1.3. InfraDocs
  2. 2. Installation
    1. 2.1. Live Installers
      1. 2.1.1. Prepare Installation Media
        1. 2.1.2. Partitioning Notes
        2. 2.1.3. Installation Guide
    2. 2.2. Advanced Installation Guides
      1. 2.2.1. Installation via chroot (x86/x86_64/aarch64)
        1. 2.2.2. Full Disk Encryption
        2. 2.2.3. Root on ZFS
        3. 2.2.4. ARM Devices
          1. 2.2.4.1. Apple Silicon (Asahi)
            1. 2.2.4.2. Lenovo Thinkpad X13s
            2. 2.2.4.3. Pinebook Pro
            3. 2.2.4.4. Raspberry Pi
    3. 2.3. musl
  3. 3. Configuration
    1. 3.1. Package Documentation
      1. 3.1.1. Manual Pages
    2. 3.2. Firmware
    3. 3.3. Locales and Translations
    4. 3.4. Users and Groups
    5. 3.5. Services and Daemons - runit
      1. 3.5.1. Per-User Services
        1. 3.5.2. Logging
    6. 3.6. rc.conf, rc.local and rc.shutdown
    7. 3.7. Cron
    8. 3.8. Solid State Drives
    9. 3.9. Security
      1. 3.9.1. AppArmor
    10. 3.10. Date and Time
    11. 3.11. Kernel
    12. 3.12. Power Management
    13. 3.13. Network
      1. 3.13.1. Firewalls
      2. 3.13.2. wpa_supplicant
      3. 3.13.3. IWD
      4. 3.13.4. NetworkManager
      5. 3.13.5. ConnMan
    14. 3.14. Network Filesystems
    15. 3.15. Session and Seat Management
    16. 3.16. Graphical Session
      1. 3.16.1. Graphics Drivers
        1. 3.16.1.1. AMD or ATI
          1. 3.16.1.2. Intel
          2. 3.16.1.3. NVIDIA
          3. 3.16.1.4. NVIDIA Optimus
      2. 3.16.2. Xorg
      3. 3.16.3. Wayland
      4. 3.16.4. Fonts
      5. 3.16.5. Icons
      6. 3.16.6. XDG Desktop Portals
      7. 3.16.7. GNOME
      8. 3.16.8. KDE
    17. 3.17. Multimedia
      1. 3.17.1. ALSA
      2. 3.17.2. PipeWire
      3. 3.17.3. PulseAudio
    18. 3.18. Bluetooth
    19. 3.19. TeX Live
    20. 3.20. External Applications
    21. 3.21. Printing
    22. 3.22. Containers and Virtual Machines
      1. 3.22.1. Chroots and Containers
      2. 3.22.2. libvirt
      3. 3.22.3. LXC
    23. 3.23. OpenPGP
    24. 3.24. PHP
  4. 4. XBPS Package Manager
    1. 4.1. Advanced Usage
    2. 4.2. Repositories
      1. 4.2.1. Mirrors
          1. 4.2.1.1. Changing Mirrors
            1. 4.2.1.2. Using Tor Mirrors
        1. 4.2.2. Restricted Packages
        2. 4.2.3. Custom Repositories
        3. 4.2.4. Signing Repositories
    3. 4.3. Troubleshooting XBPS
      1. 4.3.1. Common Issues
        1. 4.3.2. Static XBPS
  5. 5. Contributing
    1. 5.1. Contributing To void-docs

XBPS Package Manager

The X Binary Package System (XBPS) is a fast package manager that has been designed and implemented from scratch. XBPS is managed by the Void Linux team and developed at https://github.com/void-linux/xbps.

Most general package management is done with the following commands:

Most questions can be answered by consulting the man pages for these tools, together with the xbps.d(5) man page.

To learn how to build packages from source, refer to the README for the void-packages repository.

Updating

Like any other system, it is important to keep Void up-to-date. Usexbps-install(1) to update:

# xbps-install -Su

XBPS must use a separate transaction to update itself. If your update includes the xbps package, you will need to run the above command a second time to apply the rest of the updates.

Restarting Services

XBPS does not restart services when they are updated. This task is left to the administrator, so they can orchestrate maintenance windows, ensure reasonable backup capacity, and generally be present for service upgrades.

To find processes running different versions than are present on disk, use thexcheckrestart tool provided by the xtools package:

$ xcheckrestart
11339 /opt/google/chrome/chrome (deleted) (google-chrome)

xcheckrestart will print out the PID, path to the executable, status of the path that was launched (almost always deleted) and the process name.

xcheckrestart can and should be run as an unprivileged user.

Kernel Panic After Update

If you get a kernel panic after an update, it is likely your system ran out of space in /boot. Refer to "Removing old kernels" for further information.

Finding Files and Packages

To search available repositories for packages, usexbps-query(1):

$ xbps-query -Rs <search_pattern>

The -R flag specifies that repositories should be searched. Without it, -ssearches for locally-installed packages.

If you can't find a file or program you expected to find after installing a package, you can use xbps-query(1) to list the files provided by that package:

$ xbps-query -f <package_name>

The xtools package contains thexlocate(1) utility. xlocate works likelocate(1), but for files in the Void package repositories:

$ xlocate -S
Fetching objects: 11688, done.
From https://repo-default.voidlinux.org/xlocate/xlocate
 + e122c3634...a2659176f master     -> master  (forced update)
$ xlocate xlocate
xtools-0.59_1   /usr/bin/xlocate
xtools-0.59_1   /usr/share/man/man1/xlocate.1 -> /usr/share/man/man1/xtools.1

It is also possible to usexbps-query(1) to find files, though this is strongly discouraged:

$ xbps-query -Ro /usr/bin/xlocate
xtools-0.46_1: /usr/bin/xlocate (regular file)

This requires xbps-query to download parts of every package to find the file.xlocate, however, queries a locally cached index of all files, so no network access is required.

To get a list of all installed packages, without their version:

$ xbps-query -l | awk '{ print $2 }' | xargs -n1 xbps-uhelper getpkgname