Manual Page Search Parameters

XBPS-QUERY(1) General Commands Manual XBPS-QUERY(1)

xbps-queryXBPS utility to query for package and repository information

xbps-query [OPTIONS] MODE [ARGUMENTS]

The xbps-query utility prints information of a specific package or packages stored in target root directory or in registered repositories. The argument PKG is a package expression, which is explained in the PACKAGE EXPRESSION section.

A package expression is a form to match a pattern; currently xbps supports 3 ways to specify them:

  • by package name, i.e: “”.
  • by exact package name and version, i.e: “”.
  • by specifying a package name and version separated by any of the following version comparators:

    • less than
    • greater than
    • less or equal than
    • greater or equal than

      Example: “”.

The first repository matching the package expression wins.

An installed package can have some specific modes of operation. Currently the following modes are available:

The package is on hold mode. Packages in this mode won't be updated unless it's explicitely declared to be updated. The only way to update packages in this mode is by using the -f, --force option. To list packages in this mode use xbps-query -H.
The package is in manual mode of installation and won't be considered for removal when running xbps-remove -o. To list packages in this mode use xbps-query -m.
A package in repolock mode will only accept updates that are available in the same repository that was used for installing. To list packages in this mode use xbps-query --list-repolock-pkgs.

--config dir
Specifies a path to the XBPS configuration directory. If the first character is not '/' then it's a relative path of rootdir.
--cachedir dir
Specifies a path to the cache directory, where binary packages are stored. If the first character is not '/' then it's a relative path of rootdir.
--debug
Enables extra debugging shown to stderr.
--help
Show the help message.
--ignore-conf-repos
Ignore repositories defined in configuration files. Only repositories specified in the command line via --repository will be used.
--memory-sync
For remote repositories, the data is fetched and stored in memory for the current operation. This ignores the existing on-disk repository archives in rootdir.
--property PROP[,...]
Only match this package property. Multiple properties can be specified by delimiting them with commas. For a list of available properties, see the PROPERTIES section.
Enable repository mode. This mode explicitly looks in repositories, rather than looking in the target root directory.
url
Enables repository mode and adds the specified repository to the top of the list. The url argument expects a URL to the repository for remote repositories or a path for local repositories. Note that remote repositories must be signed using xbps-rindex(1). This option can be specified multiple times.
Enables string matching by using Extended Regular Expressions in compatible modes, currently in the and modes.
Prints a full dependency tree in the
Enables the use of staged packages from remote repositories. mode.
--rootdir dir
Specifies a full path for the target root directory.
--verbose
Enables verbose messages.
--version
Show the version information.

Only one of the following modes can be used at a time. By default and unless the -R option is specified, the target PKG will be queried in the root directory, otherwise it will be queried in registered repositories.

--list-pkgs
Lists registered packages in the package database (pkgdb). A package can be in any of the following states:

--list-repos
Lists repositories and the number of packages contained on them. If a repository is not available the number of packages will be . The -v option can be used to show more detailed information of remote repositories.
--list-hold-pkgs
List registered packages in the package database (pkgdb) that are on hold. Such packages won't be updated automatically.
--list-manual-pkgs
Lists registered packages in the package database (pkgdb) that were installed manually by the user (i.e not as dependency of any package).
--list-orphans
Lists package orphans in the package database (pkgdb), i.e packages that were installed as dependencies and no package is currently depending on them directly.
Lists packages that are in repolock mode. See the PACKAGE MODES section for more information.
--ownedby PATTERN [-R] [--regex]
Search for installed package files by matching PATTERN. The PATTERN argument can be a simple string, a shell wildcard pattern as explained in fnmatch(3) or an Extended Regular Expression as explained in regex(7) (if --regex option is set). If the -R option is set, the matched PATTERN in repositories will be shown.
--show PKG [-R] [--property PROP]
Shows information of an installed package. This is the default mode if no other mode is set. If the -R option is set, the matched PKG in repositories will be shown. If a package property is specified with --property, only that property will be shown.
--search PATTERN [-R] [--property PROP] [--regex]
Search for packages by matching PATTERN on its pkgver and/or short_desc properties. The same rules explained in the --ownedby option are applied, but a PACKAGE EXPRESSION is also supported. If a package property is specified with --property, all packages matching PATTERN against PROP will be shown.
--files PKG [-R]
Show the package files for PKG. If the -R option is set, the matched PKG in repositories will be shown.
--deps PKG [-R]
Show the required dependencies for PKG. Only direct dependencies are shown. To see a full dependency tree, also set --fulldeptree. If the -R option is set, the matched PKG in repositories will be shown.
--revdeps PKG [-R]
Show the reverse dependencies for PKG. If the -R option is set, the matched PKG in repositories will be shown.
FILE PKG
Prints the file FILE stored in binary package PKG to stdout. The first repository matching the PKG expression wins. This expects an absolute path. This mode only works with repositories.

This is the list of a packages properties. Note that not all properties are available for all packages.

group and file alternatives provided by the package.
target architecture the package was build for.
returns "yes" if the package was installed automatically.
enabled options the package was built with.
changelog URL for the package.
configuration file(s) installed by the package.
other packages this package conflicts with.
hash of the package file.
size of the package file.
returns "yes" if the package is held and will not be updated.
home URL of the package project.
date when the package was installed.
post-install message provided by the package.
script used for installing the package.
total size of files installed by the package.
license(s) for distributing the package.
contact of the maintainer of the package.
hash of the plist package files metadata.
name of the package.
version of the package.
returns "yes" if the package will not be removed automatically on update.
abstract facility provided by the package.
post-remove message provided by the package.
script used for removing the package.
other packages that the package replaces.
returns "yes" if the package only accepts updates from original repository.
repository where the package was installed from.
previous provided version this package replaces.
other runtime dependency packages for the package.
shared libraries provided by the package.
shared libraries required by the package.
short description of the package.
commit hash of package last change from the void-packages repository.
installation state of the package.
list of categories the package is associated with.

Overrides uname(2) machine result with this value. Useful to install packages with a fake architecture.
Sets the target architecture to this value. This variable differs from XBPS_ARCH in that it allows you to install packages partially, because configuration phase is skipped (the target binaries might not be compatible with the native architecture).

/etc/xbps.d
Default configuration directory.
/usr/share/xbps.d
Default system configuration directory.
/var/db/xbps/.<pkgname>-files.plist
Package files metadata.
/var/db/xbps/pkgdb-0.38.plist
Default package database (0.38 format). Keeps track of installed packages and properties.
/var/cache/xbps
Default cache directory to store downloaded binary packages.

xbps-alternatives(1), xbps-checkvers(1), xbps-create(1), xbps-dgraph(1), xbps-digest(1), xbps-fbulk(1), xbps-fetch(1), xbps-install(1), xbps-pkgdb(1), xbps-reconfigure(1), xbps-remove(1), xbps-rindex(1), xbps-uchroot(1), xbps-uunshare(1), xbps.d(5)

Juan Romero Pardines <xtraeme@gmail.com>

Probably, but I try to make this not happen. Use it under your own responsibility and enjoy your life.

Report bugs at https://github.com/void-linux/xbps/issues

February 9, 2023 x86_64