XBPS (X Binary Package System) is Void's native package manager written entirely from scratch in C and is not monolithic, meaning it won't accidentally break your system if a major upgrade gets interrupted.
But typing the entire commands for it all the time can get a little exhausting, so the Void community
created a package called xtools that gives you some amazing ultra-short aliases. Make
sure it's installed:
sudo xbps-install xtools
This cheatsheet doesn't list out everything these utilities are capable of but just enough to get you started with most of everything.
Installing & System Upgrades
- Install a package:
sudo xbps-install <package_name>orxi <pkg> - Synchronize repositories:
sudo xbps-install -Sorxi - Synchronize repositories and do a full upgrade:
sudo xbps-install -Syuorxi -Syu - Re-download and force reinstall an already-installed package:
sudo xbps-install -f <package_name>orxi -f <package_name> - Install a local
.xbpspackage file:
sudo xbps-install --repository=/path/to/folder/ <package_name>
orxi --repository=/path/to/folder/ <package_name>
Querying
- Search for a package in the repos:
xbps-query -Rs <package_keyword>orxq -Rs <pkg> - List all locally installed packages:
xbps-query -lorxpkg - Get details about a remote package:
xbps-query -R <package_name>orxq -R <pkg> - List the files owned/installed by a package:
xbps-query -f <package_name>orxls <pkg> - Find out which package owns a specific file path locally:
xbps-query -o /usr/bin/executableorxlocate <file>andxlocateworks even if the package isn't installed.
Note that standard operations (install, remove, upgrade) require sudo or root privileges
but queries do not.
Removing packages
- Remove a package:
sudo xbps-remove <package_name> - Remove a package and all its unused dependencies:
sudo xbps-remove -R <package_name> - Clean up orphan packages:
sudo xbps-remove -o - Clear the package download cache which is in
/var/cache/xbps/:
sudo xbps-remove -O - If you want to combine both of the 2 commands above:
sudo xbps-remove -oO
xtools does not provide an alias for xbps-remove.
Advanced stuff
- Lock/Hold a package version to prevent it from updating:
sudo xbps-pkgdb -m hold <package_name>
And to unhold it just dounholdinstead. - List all packages currently on hold:
xbps-query -Horxpkg -H - Check which running processes need a restart after an update:
xcheckrestart - See which installed packages take up the most disk space:
xhog