pkg update says everything is up to date, but pkg version says many thing are out of date

I wonder if I am misunderstanding pkg-update(8) and pkg-upgrade(8). I thought that pkg-update(8) updated the local DB on my machine about potential updates, and pkg-upgrade(8) installed the new packages.

Every few days, I run update and then upgrade, and several packages are updated.

But here's what I see now:
Code:
michael@freebsd:~ % sudo pkg update
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
michael@freebsd:~ % sudo pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Checking for upgrades (0 candidates): 100%
Processing candidates (0 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
michael@freebsd:~ % pkg version | grep "<"
apr-1.5.2.1.5.4_1                  <
cups-2.1.4                         <
fftw3-3.3.3_2                      <
fontforge-20160404                 <
giflib-5.1.3                       <
gnupg-2.1.13                       <
gnutls-3.4.15                      <
gpgme-1.6.0_1                      <
indexinfo-0.2.5                    <
jpeg-turbo-1.4.2                   <
libarchive-3.2.1,1                 <
libgd-2.2.3,1                      <
liblqr-1-0.4.1_8                   <
libreoffice-5.0.6_3                <
librevenge-0.0.4                   <
libzip-1.1.2                       <
llvm37-3.7.1_3                     <
mysql56-client-5.6.33              <
mysql56-server-5.6.33              <
nss-3.27.1                         <
pkg-1.8.8                          <
pkgconf-1.0.1                      <
png-1.6.23                         <
postgresql96-client-9.6.0          <
postgresql96-docs-9.6.0_1          <
postgresql96-server-9.6.0_1        <
py27-setuptools27-23.1.0           <
spidermonkey170-17.0.0_1           <
xfce4-conf-4.12.0                  <
xfce4-panel-4.12.0_1               <
xfce4-terminal-0.6.3_2             <
xterm-326                          <
michael@freebsd:~ %
 
Do you have VERSION_SOURCE defined in /usr/local/etc/pkg.conf? If not then pkg-version(8) will default to checking your installed packages with the Ports index. Judging from your shared commands I get the impression that you used a binary package repository to keep your system up to date, and it's not that uncommon for the binary repository to be a little behind with the Ports collection.

I only use the Ports collection, but from what I can tell from the manualpage I think you're looking for the -R switch. So: pkg version -R. It should be the default behavior if the ports tree nor the ports index exists, but I get the impression that you might have those installed right now (/usr/ports and/or /usr/ports/INDEX-x).

Hope this can help.
 
Thanks, ShelLusrer - the -R showed nothing out of date. I am using binary packages, so that makes perfect sense.
 
Thanks, ShelLusrer - the -R showed nothing out of date. I am using binary packages, so that makes perfect sense.
Glad to hear this worked for you. Don't forget, if you don't want to specify -R all the time then you can also define this in /usr/local/etc/pkg.conf. All you'd need to do is add: VERSION_SOURCE: R (see also pkg.conf(5)).
 
Back
Top