How to list outdated packages in FreeBSD
After you have updated your ports system and also it's index, you can check which packages have updates using "pkg_version" utility.
Fist, relevant "man pkg_version" info:
Quote:
PKG_VERSION(1) FreeBSD General Commands Manual PKG_VERSION(1)
NAME
pkg_version -- summarize installed versions of packages
SYNOPSIS
pkg_version [-hIoqv] [-l limchar] [-L limchar] [[-X] -s string]
[-O origin] [index]
pkg_version -t version1 version2
pkg_version -T pkgname pattern
DESCRIPTION
The pkg_version command is used to produce a report of non-base software
packages installed using the pkg_add(1) command.
...
Each package name is printed, along with a one-character status flag:
= 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.
* There are multiple versions of a particular software package
listed in the index file. Examples from the FreeBSD ports col-
lection are the Tcl toolkit or the EMACS editor.
! The installed package exists in the index but for some reason,
pkg_version was unable to compare the version number of the
installed package with the corresponding entry in the index.
...
-I, --index-only
Use only the index file for determining if a package is out of
date. This is much faster than using the version number from a
port's Makefile, at the expense of potentially giving an incor-
rect result if the index file is out of date.
-L, --no-status limchar
Limit the output to those packages whose status flag does not
match limchar. You may specify more than one character to match
in limchar. Note that because some of the status flag characters
are also special to the shell, it is best to quote limchar with
single quotes.
-v Enable verbose output. Verbose output includes some English-text
interpretations of the version number comparisons, as well as the
version numbers compared for each package. Non-verbose output
Example:
Code:
# pkg_version -vIL=
GeoIP-1.4.6 < needs updating (index has 1.4.7)
bash-4.1.9 < needs updating (index has 4.1.10)
bigreqsproto-1.1.0 < needs updating (index has 1.1.1)
binutils-2.20.1_3 < needs updating (index has 2.21)
bsdpan-File-Slurp-9999.13 < needs updating (index has 9999.19)
The above command queries the ports index instead of port's "Makefile".
Using without -I (capital i - internet) will produce a more accurate output, but it is much slower.