XBPS-QUERY(1)

πŸ“¦
version 0.60.6 Β· 2 versions
, in alpine 3.24

🌸 NAME 🌸

okay so xbps-query(1) is from the General Commands Manual, and it’s the XBPS utility for querying package and repository information. That’s the whole assignment, bestie: ask XBPS questions, get info. πŸ’…

✨ SYNOPSIS ✨

xbps-query [OPTIONS] MODE [ARGUMENTS]

πŸ¦‹ DESCRIPTION πŸ¦‹

xbps-query prints information of a specific package or packages stored in the target root directory or in registered repositories. The argument PKG is a package expression β€” and yes, there’s a whole PACKAGE EXPRESSION section below, so hold that thought. 🫢

πŸŽ€ PACKAGE EXPRESSION πŸŽ€

A package expression is a form used to match a pattern. Currently XBPS supports 3 ways to specify one:

  • by package name, i.e. "foo".
  • by exact package name and version, i.e. "foo-1.0_1".
  • by package name and version separated by any of these 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. periodt.

🌈 PACKAGE MODES 🌈

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

  • hold β€” the package is on hold mode. Packages in this mode won’t be updated unless it’s explicitly 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 πŸ’–

okay bestie, here’s the flag buffet. All the flags, all the details, no skipping.

  • -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 β€” shows the help message.
  • -i, --ignore-conf-repos β€” ignores 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 β€” enables 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 β€” yep, the source sentence literally stops at β€œthe”, and I’m not inventing the rest πŸ’€.
  • --staging β€” enables the use of staged packages from remote repositories. show dependencies mode. is sitting right there in the source too, so I’m preserving it exactly.
  • -r, --rootdir dir β€” specifies a full path for the target root directory.
  • -v, --verbose β€” enables verbose messages.
  • -V, --version β€” shows 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. We love a default, bestie.

  • -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 β€” lists 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 a 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] β€” searches 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 the --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] β€” searches 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] β€” shows the package files for PKG. If the -R option is set, the matched PKG in repositories will be shown.
  • -x, --deps PKG [-R] β€” shows 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] β€” shows 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 package’s 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. Yes, β€œbuild” is literally what the source says, bestie πŸ’€.
  • 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 the 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 the 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

okay so like, xbps-query is NOT doing this alone bestie, she's got a whole friend group and honestly? iconic ensemble cast energy. go give these queens a read:


πŸ‘‘ AUTHORS

this whole thing was written by Juan Romero Pardines <xtraeme@gmail.com> β€” yeah, the main character who literally made all of this happen. respect the origin story fr fr 🫢


πŸ’€ BUGS

probably, but I try to make this not happen.

like, that's the whole vibe. use it under your own responsibility and enjoy your life ✨ β€” that's genuinely what it says, no cap.

if you do find something cursed, report bugs at:

https://github.com/void-linux/xbps/issues

pretty please, the github issues page is right there bestie, use it πŸ’…


and that's a wrap on XBPS-QUERY(1) πŸŽ€ this was the Debian build, Feb 9, 2023, and the page itself is dated XBPS-QUERY(1) because yes she's the whole brand. go forth, query things, slay πŸ’–πŸ¦‹

πŸ“¦ where this page comes from