void-docs icon indicating copy to clipboard operation
void-docs copied to clipboard

System Maintenance documentation

Open Duncaen opened this issue 2 years ago • 5 comments

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/

Duncaen avatar Nov 18 '21 12:11 Duncaen

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.

camoz avatar Dec 30 '21 11:12 camoz

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.

paper42 avatar Dec 30 '21 11:12 paper42

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?

camoz avatar Dec 31 '21 11:12 camoz

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.

Duncaen avatar Jan 01 '22 14:01 Duncaen

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 ;)

sam6816 avatar Oct 30 '23 00:10 sam6816