diff --git a/src/xbps/advanced-usage.md b/src/xbps/advanced-usage.md index 39144f049..da341980d 100644 --- a/src/xbps/advanced-usage.md +++ b/src/xbps/advanced-usage.md @@ -38,6 +38,39 @@ Then downgrade with `xbps-install`: The `-f` flag is necessary to force downgrade/re-installation of an already installed package. +## Holding packages + +To prevent a package from being updated during a system update, use +[xbps-pkgdb(1)](https://man.voidlinux.org/xbps-pkgdb.1): + +``` +# xbps-pkgdb -m hold pkg +``` + +The hold can be removed with: + +``` +# xbps-pkgdb -m unhold pkg +``` + +## Repository-locking packages + +If you've used `xbps-src` to build and install a package from a customized +template, or with custom build options, you may wish to prevent system updates +from replacing that package with a non-customized version. To ensure that a +package is only updated from the same repository used to install it, you can +*repolock* it via [xbps-pkgdb(1)](https://man.voidlinux.org/xbps-pkgdb.1): + +``` +# xbps-pkgdb -m repolock pkg +``` + +To remove the repolock: + +``` +# xbps-pkgdb -m repounlock pkg +``` + ## Ignoring Packages Sometimes you may wish to remove a package whose functionality is being provided diff --git a/src/xbps/index.md b/src/xbps/index.md index 5e6f2e56d..2961c6ddd 100644 --- a/src/xbps/index.md +++ b/src/xbps/index.md @@ -24,6 +24,8 @@ Most general package management is done with the following commands: package-specific versions that are selected by the user. - [xbps-pkgdb(1)](https://man.voidlinux.org/xbps-pkgdb.1) can report and fix issues in the package database, as well as modify it. +- [xbps-rindex(1)](https://man.voidlinux.org/xbps-rindex.1) manages local binary + package repositories. Most questions can be answered by consulting the man pages for these tools, together with the [xbps.d(5)](https://man.voidlinux.org/xbps.d.5) man page.