void-docs
void-docs copied to clipboard
System Maintenance documentation
I think it would be good if we add a "Maintenance" section or page which describes or links to some of the important maintenance tasks.
- Updating packages
- Maybe cleaning the xbps cache
- Maybe removing orphaned packages
- Checking for changed configuration files (
xdiff
?) - Maybe checking for services that should be restarted (
xcheckrestart
?) - Removing old kernels (
vkpurge
) - Maybe cleaning up old users and groups
https://www.reddit.com/r/voidlinux/comments/qwfb77/its_maintenance_time/
Hah, just wanted to create that issue myself :)
I think those are all good points. I would definitively include cleaning the xbps cache and removing orphaned packages. Otherwise, over the years they would just pile up and use up disk space. And if there is not much free disk space in the first place (e.g. on a SBC or constrained VM/container), the system may actually end up unusable.
AFAIK xbps-remove -o
only checks for orphans, not for dropped packages. Maybe a command for that would be handy as well.
Removed packages will be replaced by the removed-packages package on a system update, so there is nothing to document other than suggest not to use -y and actually read what will happen.
Oh, I see. Do you happen to know if there's an easy way to prevent that automatic replacement of removed packages by removed-packages
and leave them installed?
Adding ignorepkg=removed-packages
to xbps.d and uninstalling the removed-packages
package. The main point of the removed package is that sometimes there are situations where a installed removed package conflicts with an update, but some other installed package might depend on that removed package resulting in a weird place where you can not update the system because it would break the removed package and you can't uninstall the package without uninstalling the dependents too, which might have changed the dependency in the update that is blocked.
I agree, but such a section already exists. 4. XBPS Package Manager and 4.1 Advanced Usage. It starts with an overview of the xbps-commands. The descriptions contain "...can also remove orphaned packages and cached package files." This is helpful (a tldr before you read the man page;) but not enough. I'd rather move it to a small own paragraph. Some of the other points seem covered in the meanwhile (xcheckrestart).
My big picture is 4. XBPS 4.1 Basic 4.2 Advanced (placeholder names). With "Finding Files and Packages" I have a first problem, because searching for and installing a normal package is pure "porcelain" (basic), and the complicated file part does not even mention the simpler -o (without -R).
I just don't know how to proceed. Maybe we close this old one and I open a new one with "Maintenance" interpreted as above (i.e. use of xbps-commands, targeting section 4.). As soon as we agree on a first edit (like adding "Orphans and Cache"), l will (try to) submit a PR. Not easy to portionate; I don't even know yet what the first small PR should be. Maybe the handbook simply wants to look like it does ;)