Table of Content

This is a two-parts article. There are few sections here.

Part One
  • Preface: Test Bed
  • Getting Started With Docker
  • Package Management: Reading, Source Code, Get Help
  • Updating System: OS Release, System Upgrade
  • Package IRSI: Install, Removal, Query Search, Show Info, List File
  • Dependency: Help, Dependency, Reverse Dependency, Test
  • Group: Metapackage
  • What's Next
Part Two
  • Repositories: Configuration, Add Subrepository, List Packages, Mirror
  • System Wide: Installed Packages, Verify, /var/db/xbps, Available, Orphan
  • History: The Log File
  • Clean Up
  • Build from Source
  • Hold: Example, Lock, Result, Unlock
  • Conclusion


Goal: Examine Package Manager, Focus on Command Line Interface

Void Linux is so interesting

  • Void has their own package manager, named XBPS.

  • Void is using runit, as alternative init to systemd, sysvinit, or openrc.

This container is built using voidstrap metapackage.

Test Bed

  1. Container: Docker

  2. Operating System: Artix (OpenRC )

  3. Window Manager: Herbstluftwm

Since we are going to use docker again, you can read a common overview here.

Of course you can use virtualization, the issue is distraction. We need to avoid tendency to focus on GUI tools. At the same time, limiting the scope to CLI tools. Most of the time, CLI tools is considered lower level than the GUI one.

Getting Started With Docker

As usual, first, we do attach docker process.

$ docker pull voidlinux/voidlinux
$ docker image list 

  --format 'table {{.Repository}}\t{{.Size}}'

REPOSITORY              SIZE
gentoo/stage3-amd64     873MB
vbatts/slackware        86.7MB
voidlinux/voidlinux     202MB
kevinleptons/lfs-auto   753MB
$ docker run -it voidlinux/voidlinux bash
bash-4.4# exit
$ docker ps -a 

  --format 'table {{.Image}}\t{{.Names}}\t{{.Status}}'

IMAGE                 NAMES               STATUS
voidlinux/voidlinux   awesome_davinci     Up About an hour
gentoo/stage3-amd64   amazing_shirley     Exited (0) 23 hours ago
vbatts/slackware      cranky_keller       Exited (0) 26 hours ago
$ docker start awesome_davinci
$ docker attach awesome_davinci

Docker Void: Getting Started

Package Management

Void Linux use The X Binary Package System (XBPS) as package management.


Source Code

Get Help

Read the fine manual.

$ man xbps-query
$ man xbps-install
$ xbps-install --help


First Thing First

First thing to do is updating my system as usual.

  • OS Release

  • Update

OS Release

$ cat /etc/os-release

System Upgrade

$ xbps-install --sync --update


$ xbps-install -Su

[*] Updating '' ...

Docker Void: XBPS System Upgrade: Start

Docker Void: XBPS System Upgrade: End

Package IRSIF

Install, Remove, Search, Info, File

Read the fine manual.

Package Install

$ xbps-install -S nano htop mc ncdu curl
[*] Updating '' ...

Name    Action    Version           New version            Download size
nano    install   -                 2.8.6_1                - 
htop    install   -                 2.0.2_2                - 
libgpm  install   -                 1.20.7_8               - 
libelf  install   -                 0.170_1                - 
libffi  install   -                 3.2.1_2                - 
glib    install   -                 2.52.3_1               - 
mc      install   -                 4.8.19_1               - 
ncdu    install   -                 1.12_1                 - 
jansson install   -                 2.10_1                 - 
nghttp2 install   -                 1.24.0_1               - 
libcurl install   -                 7.55.1_1               - 
curl    install   -                 7.55.1_1               - 

Size required on disk:          22MB
Free space on disk:             27GB

Do you want to continue? [Y/n] 

Docker Void:  XBPS Package Install: Start

Docker Void: XBPS Package Install: End

Package Removal

$ xbps-remove -R nano htop mc ncdu curl

Name    Action    Version           New version            Download size
nano    remove    2.8.6_1           -                      - 
htop    remove    2.0.2_2           -                      - 
mc      remove    4.8.19_1          -                      - 
glib    remove    2.52.3_1          -                      - 
libgpm  remove    1.20.7_8          -                      - 
libffi  remove    3.2.1_2           -                      - 
libelf  remove    0.170_1           -                      - 
ncdu    remove    1.12_1            -                      - 
curl    remove    7.55.1_1          -                      - 
libcurl remove    7.55.1_1          -                      - 
nghttp2 remove    1.24.0_1          -                      - 
jansson remove    2.10_1            -                      - 

Size freed on disk:             22MB
Free space on disk:             27GB

Do you want to continue? [Y/n]

Docker Void: XBPS Package Removal

$ xbps-install fish
Unable to locate 'fish' in repository pool.
$ xbps-query -Rs fish
[-] bluefish-2.2.10_1               A powerful HTML editor for e...
[-] fish-shell-2.6.0_1              User friendly shell intended...
[-] perl-Crypt-Blowfish-2.14_5      Crypt::Blowfish - Blowfish c...
[-] perl-Crypt-Blowfish_PP-1.12_2   Blowfish encryption algorith...
[-] python-jellyfish-0.5.6_2        Python2 library for approxim...
[-] python3-jellyfish-0.5.6_2       Python3 library for approxim...
[-] python3.4-jellyfish-0.5.6_2     Python3.4 library for approx...
[-] stockfish-8_1                   A free UCI chess engine deri...
[-] wifish-1.1.3_2                  Simple wifi tool
[-] zsh-syntax-highlighting-0.5.0_1 Fish shell like syntax highl...
$ xbps-install fish-shell
3 packages will be downloaded:
  bc-1.07.1_1 groff-1.22.3_3 fish-shell-2.6.0_1 
3 packages will be installed:
  bc-1.07.1_1 groff-1.22.3_3 fish-shell-2.6.0_1 

Size to download:             3070KB
Size required on disk:          19MB
Free space on disk:             27GB

Do you want to continue? [Y/n] y

Docker Void: XBPS Search Query

Package Show Info

$ xbps-query -RS htop

Docker Void: XBPS Show Info

List Files

Listing files in particular package.

$ xbps-query -f ncdu


$ xbps-query --file ncdu

Docker Void: XBPS Query File

There is this file owner command.

$ xbps-query --ownedby /etc/man_db.conf 
man-db- /etc/man_db.conf (configuration file)

Docker Void: XBPS Query Ownedby


There are two main topics in dependency, dependency itself, and reverse dependency. Beside these two, there are other topic as well, such as managing conflict that we do not cover here.


Package that required by: such as man-db need groff and other.

This dependency information can be achieved by -x or code>-Rx</code> command. This will show required parts of the package.

$ xbps-query -x man-db

Docker Void: XBPS Dependency

Reverse Dependency

Package that require: such as groff needed by man or other.

This reverse dependency require -X or -RX command.

$ xbps-query -X groff 
$ xbps-query -RX groff 

Docker Void: XBPS Reverse Dependency


Should remove man-db first before removing groff. fish-shell also depends on man-db.

$ xbps-remove groff
groff-1.22.3_3 (remove) breaks installed pkg 'fish-shell-2.6.0_1'
groff-1.22.3_3 (remove) breaks installed pkg 'man-db-'
Transaction aborted due to unresolved dependencies.

Docker Void: XBPS Test Remove


I cannot find any reference about group in XBPS. I guess there is no group concept in XBPS.


However you can use meta-package, combined with this cheap search tricks.

Docker XBPS: Metapackages

Docker XBPS: Metapackages

What’s Next

xbps is rarely used. Consider finish reading [ Part Two ].

Thank you for reading