XBPS-QUERY(1)
πΈ 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,--forceoption. To list packages in this mode usexbps-query -H.manualβ the package is in manual mode of installation and wonβt be considered for removal when runningxbps-remove -o. To list packages in this mode usexbps-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 usexbps-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 ofrootdir.-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 ofrootdir.-d,--debugβ enables extra debugging shown tostderr.-h,--helpβ shows the help message.-i,--ignore-conf-reposβ ignores repositories defined in configuration files. Only repositories specified in the command line via--repositorywill 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 inrootdir.-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. Theurlargument expects a URL to the repository for remote repositories or a path for local repositories. Note that remote repositories must be signed usingxbps-rindex(1). This option can be specified multiple times.--regexβ enables string matching by using Extended Regular Expressions in compatible modes, currently in theownedbyandsearchmodes.--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 withxbps-reconfigure(1).hrβ package is half-removed, and can be fully removed withxbps-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-voption 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 matchingPATTERN. ThePATTERNargument can be a simple string, a shell wildcard pattern as explained infnmatch(3)or an Extended Regular Expression as explained inregex(7)(if the--regexoption is set). If the-Roption is set, the matchedPATTERNin 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-Roption is set, the matchedPKGin 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 matchingPATTERNon itspkgverand/orshort_descproperties. The same rules explained in the--ownedbyoption are applied, but aPACKAGE EXPRESSIONis also supported. If a package property is specified with--property, all packages matchingPATTERNagainstPROPwill be shown.-f,--files PKG [-R]β shows the package files forPKG. If the-Roption is set, the matchedPKGin repositories will be shown.-x,--deps PKG [-R]β shows the required dependencies forPKG. Only direct dependencies are shown. To see a full dependency tree, also set--fulldeptree. If the-Roption is set, the matchedPKGin repositories will be shown.-X,--revdeps PKG [-R]β shows the reverse dependencies forPKG. If the-Roption is set, the matchedPKGin repositories will be shown.--cat FILE PKGβ prints the fileFILEstored in binary packagePKGtostdout. The first repository matching thePKGexpression 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 theuname(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 fromXBPS_ARCHin 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:
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
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
- alpine 3.24: xbps-doc 0.60.6-r1 Β· BSD-2-Clause AND BSD-3-Clause AND ISC
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms