Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
PKG-RQUERY(8)		     System Manager's Manual		   PKG-RQUERY(8)

NAME
     pkg rquery -- query information from remote repositories

SYNOPSIS
     pkg rquery -I|query-format pkg-name
     pkg rquery [-aU] [-r reponame ...] -I|query-format
     pkg rquery [-U] [-Cgix] [-e evaluation-condition] [-r reponame ...]
	 -I|query-format pattern ...

DESCRIPTION
     pkg rquery is used for displaying information about remote packages.

     Package  repository  catalogues  will be automatically updated whenever pkg
     rquery is run by a user ID with write access to the package  database,  un-
     less  disabled  by  the  -U  flag	or  setting  REPO_AUTOUPDATE  to "NO" in
     pkg.conf(5).

OPTIONS
     The following options are supported by pkg rquery:

     -a, --all
	     Match all packages from the database.

     -C, --case-sensitive
	     Make the standard or the regular expression (-x)  matching  against
	     pkg-name  in  pattern  case sensitive.  This is the default, unless
	     modified by setting CASE_SENSITIVE_MATCH to "false" in pkg.conf.

     -e evaluation-condition, --evaluate evaluation-condition
	     Match  packages  using   the   given   evaluation-condition.    See
	     "EVALUATION FORMAT" for details.

     -I, --index-line
	     Print out the corresponding line from the ports INDEX file for each
	     matched package.  This option is a shorthand query-format argument.
	     Only  the	first query format (including the -I option) on the com-
	     mand line will be interpreted.

     -r reponame, --repository reponame
	     Query for data about packages from only the named repository.  This
	     option can be specified multiple times to use several repositories.
	     Data will be queried from the named repositories only, irrespective
	     of the configured "enabled" status  from  repo.conf.   By	default,
	     catalogues for all enabled repositories are queried.

     -g, --glob
	     Treat pattern as a glob pattern.

     -i, --case-insensitive
	     Make  the	standard  or  regular  expression  (-x) matching against
	     pkg-name in pattern case insensitive.

     -U, --no-repo-update
	     Suppress the automatic update of the local copy of  the  repository
	     catalogue	from remote.  Automatic repository catalogue updates are
	     only attempted when the effective UID of the process has write  ac-
	     cess to the package database.  Otherwise they are silently ignored.

     -x, --regex
	     Treat  pattern as a regular expression according to the "modern" or
	     "extended" syntax of re_format(7).

QUERY FORMAT
     There are two types of keywords for the query format: the multiline and the
     normal one.  Only one type of multiline pattern is  accepted  for	a  given
     query.

   Normal patterns:
     %R      Name of the repository the package is in

     %n      Name of the matched package

     %v      Version of the matched package

     %o      Origin of the matched package

     %p      Prefix of the matched package

     %m      Maintainer of the matched package

     %c      Comment of the matched package

     %e      Description of the matched package

     %w      Home page of the matched package

     %q      Architecture of the matched package

     %l      License logic of the matched package

	     One of the following will be printed:
	     "single"  if the package is distributed under one license
	     "and"     if the package is multi-licensed
	     "or"      if the package is dual-licensed

     %s[bh]  The flat size of the matched package, where b is in bytes, and h is
	     in human readable format

     %?[drCOLBbA]
	     Returns 0 if the list is empty and 1 if the list has information to
	     display

	     d	for dependencies

	     r	for reverse dependencies

	     C	for categories

	     O	for options

	     L	for licenses

	     B	for required shared libraries

	     b	for provided shared libraries

	     A	for annotations

     %#[drCOLBbA]
	     Returns the number of elements in the list

	     d	for dependencies

	     r	for reverse dependencies

	     C	for categories

	     O	for options

	     L	for licenses

	     B	for required shared libraries

	     b	for provided shared libraries

	     A	for annotations

   Multiline patterns:
     %d[nov]
	     Expands  to the list of dependencies for the matched package, where
	     n stands for the package name, o for the package origin, and v  for
	     the package version.

     %r[nov]
	     Expands  to  the list of reverse dependencies for the matched pack-
	     age, where n stands for the package name, o for the package origin,
	     and v for the package version.

     %C      Expands to the list of categories the matched package belongs to.

     %O[kv]  Expands to the list of options of	the  matched  package,	where  k
	     stands for option key and v for option value.

     %L      Expands to the list of license(s) for the matched package.

     %B      Expands  to  the list of shared libraries used by programs from the
	     matched package.

     %b      Expands to the list of shared libraries  provided	by  the  matched
	     package.

     %A[tv]  Expands  to  the  list  of  annotations associated with the matched
	     package, where t stands for the annotation tag, and  v  stands  for
	     the annotation value.

   Inline iteration with %{...%}
     When  the	format string contains a %{...%} construct, the entire format is
     interpreted using pkg_printf(3) format codes.  This allows multiline  items
     to be joined on a single line.  See pkg-query(8) for full details and exam-
     ples.

EVALUATION FORMAT
   Variables
     %n      Name of the package (type string)

     %o      Origin of the package (type string)

     %p      Prefix of the package (type string)

     %m      Maintainer of the package (type string)

     %c      Comment of the package (type string)

     %e      Description of the package (type string)

     %w      WWW address of the package (type string)

     %s      Flatsize of the package (type integer)

     %a      Automatic status of the package (type integer)

     %q      Architecture of the package (type string)

     %#[drCOLBbA]
	     Number  of elements in the list of information (type integer).  See
	     %? above for what information is used.

   Operators
     var ~ glob
	     The string value of var matches the given glob pattern.

     var !~ glob
	     The string value of var does not match the given glob pattern.

     var >[=] num
	     The numerical value of var is greater than [or equal to] the  given
	     number.

     var <[=] num
	     The  numerical  value  of	var is less than [or equal to] the given
	     number.

     var =[=] [num | string]
	     The value of var is equal to the given number or string.

     var =~ [num | string]
	     The value of var is equal (case insensitive) to the given number or
	     string.

     var != [num | string]
	     The value of var is not equal to the given number or string.

     var !=~ [num | string]
	     The value of var is not equal case insensitive to the given  number
	     or string.

ENVIRONMENT
     The  following  environment  variables  affect the execution of pkg rquery.
     See pkg.conf(5) for further description.

     PKG_DBDIR

     CASE_SENSITIVE_MATCH

FILES
     See pkg.conf(5).

EXIT STATUS
     The pkg rquery utility exits 0 on success, and >0 if an error occurs.

EXAMPLES
     See pkg-query(8) for example usage.

SEE ALSO
     pkg_checksum(3), pkg_create(3), pkg_printf(3), pkg_repo_create(3),  pkg_re-
     pos(3),   pkg-keywords(5),   pkg-lua-script(5),   pkg-repository(5),   pkg-
     script(5), pkg-triggers(5), pkg.conf(5), pkg(8), pkg-add(8),  pkg-alias(8),
     pkg-annotate(8),  pkg-audit(8), pkg-autoremove(8), pkg-check(8), pkg-check-
     sum(8), pkg-clean(8),  pkg-config(8),  pkg-create(8),  pkg-delete(8),  pkg-
     fetch(8),	 pkg-help(8),	pkg-info(8),  pkg-install(8),  pkg-key(8),  pkg-
     lock(8), pkg-plugins(8), pkg-query(8), pkg-register(8),  pkg-repo(8),  pkg-
     repositories(8),  pkg-rwhich(8),  pkg-search(8),  pkg-set(8), pkg-shell(8),
     pkg-shlib(8), pkg-ssh(8), pkg-stats(8), pkg-triggers(8), pkg-unregister(8),
     pkg-update(8),  pkg-updating(8),	pkg-upgrade(8),   pkg-version(8),   pkg-
     which(8)

FreeBSD ports 15.quarterly	 April 17, 2026 		   PKG-RQUERY(8)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=pkg-rquery&sektion=8&manpath=FreeBSD+15.1-RELEASE+and+Ports.quarterly>

home | help