|  | 
   
 |   |  |   
  
    | PKG-VERSION(8) | FreeBSD System Manager's Manual | PKG-VERSION(8) |  
pkg version—
    summarize installed versions of packages
 
  
    | pkg version | [ -IPR] [-hoqvU]
      [-llimchar]
      [-Llimchar]
      [-Cegixpattern]
      [-rreponame]
      [-Oorigin |-npkgname]
      [index] |  
 
  
    | pkg version | -tversion1
      version2 |  
 
  
    | pkg version | -Tpkgname
      pattern |  
 
  
    | pkg version | [ --{index,ports,remote}]
      [--{help,origin,quiet,verbose,no-repo-update}]
      [--likelimchar]
      [--not-likelimchar]
      [--{case-sensitive,exact,glob,case-insensitive,regex}pattern] [--repositoryreponame] [--match-originorigin] [index] |  
 
  
    | pkg version | --test-versionversion1
      version2 |  
 
  
    | pkg version | --test-patternpkgname
      pattern |  pkg versionis used for generating a
    report of packages installed by
    pkg(8).
 The database of available packages and versions to compare against
    the installed packages may be chosen by specifying one of
    -P,-Ror-Ior by settingVERSION_SOURCEin
    pkg.conf(5).
    If not specified then the ports index file will be used if it exists
    (-I). Otherwise, should a ports tree exist that will
    be used to compare versions (-P). Failing either of
    those two choices, the repository catalogue will be used
    (-R). When -Iis used, versions of
    installed packages will be compared to the versions listed in the file
    argument index, or if that is not given explicitly, in
    the default ports index file (typically located as
    /usr/ports/INDEX-N, where
    N is the OS major
    version number.) When -Ris used, package
    repository catalogues will be automatically updated wheneverpkg versionis run by a user ID with write access to
    the package database, unless disabled by the-Uflag
    or settingREPO_AUTOUPDATEto
    NO in
    pkg.conf(5). When comparing package versions the package name and a comparison
    character are printed: 
  =The installed version of the package is current.<The installed version of the package is older than the current
    version.>The installed version of the package is newer than the current version.
      This situation can arise with an out of date index file, or when testing
      new ports.?The installed package does not appear in the index. This could be due to
      an out of date index or a package taken from a PR that has not yet been
      committed.!The installed package exists in the index but for some reason,
      pkg versionwas unable to compare the version
      number of the installed package with the corresponding entry in the
    index. The following options are supported by pkg
    version: 
  -C,--case-sensitiveMake the standard or the regular expression (-x)
      matching against pkg-name case sensitive.-h,--helpDisplays usage information.-I[index],--index[index]Use index file for determining if a package is out
      of date. If no index file name is specified, uses
      the default index file. This is the default, if the index file
    exists.-P,--portsUse ports for determining if a package is out of date. This is the default
      if the index file is not present and a ports tree exists. The tree used
      can be overridden by PORTSDIR, see
      pkg.conf(5)
      for more information.-R,--remoteUse repository catalogue for determining if a package is out of date. This
      is the default if neither the ports index nor the ports tree exists.-U,--no-repo-updateSuppress the automatic update of the local copy of the repository
      catalogue from remote. This only has any effect in combination with the
      -Roption. Automatic repository catalogue updates
      are only attempted when the effective UID of the process has write access
      to the package database. Otherwise they are silently ignored.-rreponame,--repositoryreponameCompare installed package versions to packages available from the named
      repository only, irrespective of the configured “enabled”
      status from repo.conf. By default, catalogues for
      all enabled repositories are used for version comparisons. Implies
      -R.-o,--originDisplay package origin, instead of package name.-q,--quietBe quiet. Less output will be produced.-v,--verboseBe verbose.-llimchar,--likelimcharDisplay only the packages which status flag matches the one specified by
      limchar.-Llimchar,--not-likelimcharDoes the opposite of -lflag. Displays the
      packages which status flag does not match the one specified by
      limchar.-i,--case-insensitiveMake the exact (-e) or regular expression
      (-x) matching against
      pattern case insensitive. This is the default,
      unless modified by settingCASE_SENSITIVE_MATCHto
      true in pkg.conf.-xpattern,--regexpatternOnly display the packages that match the regular expression. Uses the
      "modern" or "extended" syntax of
      re_format(7).-gpattern,--globpatternOnly display the packages that match the glob expression.-estring,--exactstringOnly display the packages that exactly match the string.-Oorigin,--match-originoriginDisplay only the packages which origin matches
      origin.-npkgname,--match-namepkgnameDisplay only the packages which name matches
      pkgname.-tversion1 version2,--test-versionversion1
    version2Test a pair of version number strings and exit. The output consists of one
      of the single characters =(equal),<(right-hand number greater), or>(left-hand number greater) on standard
      output. This flag is mostly useful for scripts or for testing.-Tpkgname pattern,--test-patternpkgname
    patternCompare pkgname against shell glob
      pattern and set exit code accordingly.
      -Tcan also be used in `filter mode': When one of
      the arguments is `-', standard input is used, and lines with matching
      package names/patterns are echoed to standard output. The following environment variables affect the execution of
    pkg version. See
    pkg.conf(5)
    for further description. 
  CASE_SENSITIVE_MATCH INDEXDIR INDEXFILE PKG_DBDIR PORTSDIR  The default index file is searched for in
    INDEXDIR, or if that is not set,PORTSDIR.INDEXFILEis the
    name of the index relative to that directory. IfINDEXFILEis not set, the default file name is
    INDEX-N whereNis the OS
    major version number. The following is a typical invocation of the pkg
    versioncommand, which checks the installed packages against the
    local ports index file: % pkg version -v
 The command below generates a report against the versions in the
    repository catalogue: % pkg update
 % pkg version -vR
 The following lists packages needing upgrade, compared to the
    repository catalogue: % pkg update
 % pkg version -vRL=
 The following command compares two package version strings: % pkg version -t 1.5
  1.5.1
 pkg_create(3),
    pkg_printf(3),
    pkg_repo_create(3),
    pkg_repos(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-clean(8),
    pkg-config(8),
    pkg-create(8),
    pkg-delete(8),
    pkg-fetch(8),
    pkg-info(8),
    pkg-install(8),
    pkg-key(8),
    pkg-lock(8),
    pkg-query(8),
    pkg-register(8),
    pkg-repo(8),
    pkg-repositories(8),
    pkg-rquery(8),
    pkg-search(8),
    pkg-set(8),
    pkg-shell(8),
    pkg-shlib(8),
    pkg-ssh(8),
    pkg-stats(8),
    pkg-triggers(8),
    pkg-update(8),
    pkg-updating(8),
    pkg-upgrade(8),
    pkg-which(8) 
  Visit the GSP FreeBSD Man Page Interface. Output converted with ManDoc.
 |