
This cheatsheet collects commands and tools you might find useful when starting out with Void Linux. This guide will be updated as I learn .
ยงXBPS Package Manager
The Void package manager is XBPS โ the X Binary Package System. It was written from scratch for use with Void. Common commands:
xbps-install -Suโ update the systemxbps-install PACKAGEโ install PACKAGExbps-install -Aโ install a package temporarily, for evaluation. this package and its dependencies will be removed whenxbps-remove -ois runxbps-query -Rs QUERYโ search repositories for packagesxbps-query -f PACKAGEโ list files provided by PACKAGExbps-query -lโ list all packages with versions and descriptionsxbps-query -l | cut -d " " -f 2 | sed "s/^\(.*\)-.*$/\1/"โ list all package names (might want to alias this)xbps-remove -R PACKAGEโ remove a package and any of its dependendcies that are no longer neededxbps-remove -Ooโ remove orphan packages and clean the cache. will also remove packages installed withxbps-install -A
Install xtools for additional tools:
xlocate -S | QUERYโ search for paths within all packages. Useful to find which package a command is in, etc.- Run
xlocate -Sfirst to cache package data. Run occasionally to keep the cache updated - Use like
xlocate /usr/bin/dig. Absolute paths work best;xlocate npmreturns 2716 results,xlocate /usr/bin/npmreturns one.
- Run
xcheckrestart [-v]โ XBPS does not restart services when they're updated. Run this to check for services that need to be restarted.
ยงService Management
Services are managed with the sv command. Usage examples:
ln -s /etc/sv/SERVICE /var/service/โ start a service now and configure it to start at bootrm /var/service/SERVICEโ stop a service now and prevent it from starting at bootsv up SERVICESโ start a service now and re-start it if it stops, but don't configure it to start at bootsv down SERVICESโ stop a service now and do not restart it. doesn't prevent a service from re-starting at bootsv restart SERVICESsv status SERVICESls /var/serviceโ contains symlinks for all running servicessv s /var/service/*โ show status of all running services
Install sv-helper for some additional tools:
sv-listโ list all available servicessvls SERVICEโ likesv-listbut you can limit output to a single SERVICEsv-enable SERVICEโ enable a service to start at boot, and start it nowsv-disable SERVICEโ stop a service from starting at boot, and stop it now
ยงManaging old kernels
Old kernels are not removed when new ones are built, to allow you rollback to previous versions. This will eventually cause your /boot partition to run out of space, causing update errors and kernel panics.
You can manage old kernel versions using vkpurge:
vkpurge listโ list unused, removable kernelsvkpurge rm allโ remove all removable kernelsvkpurge rm '2.6.*' 4.3.4_1โ remove all removable kernels matching a pattern, and remove a specific version
