Manpage logo

xbps-query - XBPS utility to query for package and repository information


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

NAME

xbps-query — XBPS utility to query for package and repository information

SYNOPSIS

xbps-query [OPTIONS] MODE [ARGUMENTS]

DESCRIPTION

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.

PACKAGE EXPRESSION

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

by package name, i.e: “foo”.

by exact package name and version, i.e: “foo-1.0_1”.

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: “foo>=2.0”.

The first repository matching the package expression wins.

PACKAGE MODES

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

hold

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.

manual

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.

repolock

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.

OPTIONS
−C, −-config
dir

Specifies a path to the XBPS configuration directory. If the first character is not ’/’ then it’s a relative path of rootdir.

−c, −-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.

−d, −-debug

Enables extra debugging shown to stderr.

−h, −-help

Show the help message.

−i, −-ignore-conf-repos

Ignore repositories defined in configuration files. Only repositories specified in the command line via --repository will be used.

−M, −-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.

−p, −-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.

−R

Enable repository mode. This mode explicitly looks in repositories, rather than looking in the target root directory.

−-repository 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.

−-regex

Enables string matching by using Extended Regular Expressions in compatible modes, currently in the ownedby and search modes.

−-fulldeptree

Prints a full dependency tree in the

−-staging

Enables the use of staged packages from remote repositories. show dependencies mode.

−r, −-rootdir dir

Specifies a full path for the target root directory.

−v, −-verbose

Enables verbose messages.

−V, −-version

Show the version information.

MODE

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.

−l, −-list-pkgs

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

ii Package is installed.
uu
Package is unpacked but must be configured with xbps-reconfigure(1).
hr
Package is half-removed, and can be fully removed with xbps-remove(1).
??
Package state is unknown.

−L, −-list-repos

Lists repositories and the number of packages contained on them. If a repository is not available the number of packages will be -1. The −v option can be used to show more detailed information of remote repositories.

−H, −-list-hold-pkgs

List registered packages in the package database (pkgdb) that are on hold. Such packages won’t be updated automatically.

−m, −-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).

−O, −-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.

−-list-repolock-pkgs

Lists packages that are in repolock mode. See the PACKAGE MODES section for more information.

−o, −-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.

−S, −-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.

−s, −-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.

−f, −-files PKG [−R]

Show the package files for PKG. If the −R option is set, the matched PKG in repositories will be shown.

−x, −-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.

−X, −-revdeps PKG [−R]

Show the reverse dependencies for PKG. If the −R option is set, the matched PKG in repositories will be shown.

−-cat 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.

PROPERTIES

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

alternatives

group and file alternatives provided by the package.

architecture

target architecture the package was build for.

automatic-install

returns "yes" if the package was installed automatically.

build-options

enabled options the package was built with.

changelog

changelog URL for the package.

conf_files

configuration file(s) installed by the package.

conflicts

other packages this package conflicts with.

filename-sha256

hash of the package file.

filename-size

size of the package file.

hold

returns "yes" if the package is held and will not be updated.

homepage

home URL of the package project.

install-date

date when the package was installed.

install-msg

post-install message provided by the package.

install-script

script used for installing the package.

installed_size

total size of files installed by the package.

license

license(s) for distributing the package.

maintainer

contact of the maintainer of the package.

metafile-sha256

hash of the plist package files metadata.

pkgname

name of the package.

pkgver

version of the package.

preserve

returns "yes" if the package will not be removed automatically on update.

provides

abstract facility provided by the package.

remove-msg

post-remove message provided by the package.

remove-script

script used for removing the package.

replaces

other packages that the package replaces.

repolock

returns "yes" if the package only accepts updates from original repository.

repository

repository where the package was installed from.

reverts

previous provided version this package replaces.

run_depends

other runtime dependency packages for the package.

shlib-provides

shared libraries provided by the package.

shlib-requires

shared libraries required by the package.

short_desc

short description of the package.

source-revisions

commit hash of package last change from the void-packages repository.

state

installation state of the package.

tags

list of categories the package is associated with.

ENVIRONMENT
XBPS_ARCH

Overrides uname(2) machine result with this value. Useful to install packages with a fake architecture.

XBPS_TARGET_ARCH

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

FILES
/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.

SEE ALSO

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)

AUTHORS

Juan Romero Pardines <[email protected]>

BUGS

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 GNU Feb 9, 2023 XBPS-QUERY(1)


Updated 2026-06-01 - jenkler.se | uex.se