PACKAGE-QUERY(8)

NAME
package-query - Query alpm database and/or AUR

SYNOPSIS

package-query <options> [targets ...]

DESCRIPTION

Package-query query Alpm and AUR with the possibility to format output.

OPTIONS

-A, --aur
    Query AUR database.

-L, --list-repo
    List configured repositories.

-Q, --query
    Query local database.

-S, --sync
    Query sync database.

-v, --version
    Display version and exit.

-h, --help
    Show help.

--aur-url <AUR url>
    Specify a custom AUR url (default to https://aur.archlinux.org).

-b, --dbpath <database path>
    Specify new database location, default to <root>/var/lib/pacman.

-c, --config <configuration file>
    Specify a custom config, default to <root>/etc/pacman.conf.

-f, --format <format>
    Format output, see Format options.

-p, --file <file>
    Query file.

-q, --quiet
    No output, return 0 if packages found, else 1.

-r, --root <root path>
    Specify a new root, default to /.

-u, --upgrades
    List updates available.

-x, --escape
    Escape \" in output.

--insecure
    Perform insecure ssl connection (if compiled with curl support).

--nocolor
    Output without colors.

--show-size
    Show package size.

COMMON SEARCH OPTIONS

-1, --just-one
    Show first answer for each target (-i).

-i, --info
    Search by name (by default if no target). Specify this option twice to search a package that provides the target.

--maintainer
    Search by maintainer (AUR only). No target means search for orphaned packages.

--qconflicts
    Query packages which conflicts with one of the targets.

--qdepends
    Query packages which depends on one of the targets.

--qprovides
    Query packages which provides one of the targets.

--qreplaces
    Query packages which replaces one of the targets.

--qrequires
    Query packages required by the targets.

-s, --search
    Regex search for ALPM and SQL search for AUR.

--nameonly
    Search within package names only (regex support for ALPM, strict check for AUR).

--sort [n,w,p,r,1,2]
    Return search results sorted by names (n), by votes (w), by popularity (p), by relevance (r), by installed date (1) or by theorical size (2).

--rsort [n,w,p,1,2]
    Like --sort, but the results are sorted in reverse order.

LOCAL DB SEARCH

-n, --native
    Filter result to packages that were found in the sync database(s).

-m, --foreign
    Filter result to packages that were not found in the sync database(s). With -A search if foreign packages exist in AUR.

-e, --explicit
    Only show packages explicitly installed.

-d, --deps
    Restrict output to packages installed as dependencies.

-t, --unrequired
    Restrict output to packages that are no more required. -tt will also list the packages that are only optional deps.

-u, --upgrades
    Restrict output to packages that have available updates. With -A search if foreign packages have updates on AUR.

SYNC DB SEARCH

-g, --groups
    List groups or packages contained in a group if provided with argument.

-l, --list
    List repository content.

FORMAT OPTIONS

Format can contain:

    %a: architecture
    %b: base package
    %B: backups file
    %c: check dependencies (AUR and local package tarball)
    %C: conflicts with
    %d: description
    %D: depends on
    %e: licenses
    %f: filename
    %F: package's files
    %g: groups
    %G: git clone url
    %i: AUR ID
    %I: install script
    %k: base package ID (AUR)
    %K: keywords (AUR)
    %l: local version
    %L: last submission (AUR)
    %m: maintainer or packager
    %M: make dependencies (AUR and local package tarball)
    %n: name
    %N: required by (Needed by)
    %o: out of date (1 for true)
    %O: optional deps
    %p: popularity (AUR)
    %P: provides
    %r: repository, 'local' for local packages
    %R: replaces
    %s: sync repository, respect 'pacman.conf' order.
    %S: first submission (AUR)
    %t: target submitted with command
    %u: file/tarball url
    %U: software url
    %v: version, depends on DB
    %V: package version in sync db
    %w: votes (AUR)

    %1: install date
    %2: theorical size
    %3: real size
    %4: package state. Show a combination of the following states:
            1: foreign
            2: explicitly installed
            4: installed as dependency
            8: unrequired
            16: update available
            32: package part of group
    %5: download size
    %6: build date

    \\, \e (for \033), \n, \r and \t are also possible format options.

--delimiter <delim>
    For format like %B, %C ..., define separator. Default to space.

ENVIRONMENT VARIABLES

PQ_COLORS
    Specifies the colors used in default output. Its value is a colon-separated list of keys. Supported keys are: no= No color. (default: 0) nb= Numbers (when numbering lines) color. (default: 1;33;7) pkg= Package name. (default: 1) ver= Package version. (default: 1;32) lver= Installed version. (default: 1;31;7) installed= [installed] color. (default: 1;33;7) grp= Groups. (default: 1;34) od= Out of date status. (default: 1;33;7) votes= Number of votes. (default: 1;33;7) popularity= Popularity. (default: 1;33;7) dsc= Description. (default: 0) orphan= Package version when there is no maintainer other= Respository not explicitly defined. (default: 1;35) [repo name]= Repository specific color. (default: testing=1;31:core=1;31:extra=1;32:local=1;33)

SEE ALSO

pacman(8), pacman.conf(5)

BUGS

https://github.com/archlinuxfr/package-query

AUTHORS

Tuxce <tuxce.net@gmail.com>

Current maintainers:

    • Skunnyk <skunnyk@archlinux.fr>

    • Igor <f2404@yandex.ru>