# pkg_version and portversion discrepancy



## Grell (Mar 31, 2011)

Hey,

I use portupgrade to update my ports, and use `portsdb -Fu` to update the (database?).

Anyway, [cmd=]pkg_version | grep '<'[/cmd] returns nothing in need of updating.  However [cmd=]portversion -vL=[/cmd] comes back with this:

```
[root@BlackBox /usr/ports]# portversion -L=
py26-bsddb                  <
py26-gdbm                   <
py26-sqlite3                <
py26-tkinter                <
```

What can I do to get these two programs data in sync?  Thank you.


----------



## achix (Mar 31, 2011)

`# pkg_version` uses /var/db/pkg and /usr/ports/INDEX-8,
while `# portversion` (faster) uses /var/db/pkg/pkgdb.db and /usr/ports/INDEX-8.db
`# portsdb -Fu`updates only /usr/ports/INDEX-8.db (and you rarely need to do this by hand, since other tools (portsnap) take care of this), so what you must do actually is run `# pkgdb -Fu`, which deals with /var/db/pkg/pkgdb.db

In short /var/db/pkg/ and /var/db/pkg/pkgdb.db have the really installed packages, while /usr/ports/INDEX-8 and /usr/ports/INDEX-8.db have all the potential ports/packages.


----------



## wblock@ (Mar 31, 2011)

Did you follow 20110304 in /usr/ports/UPDATING?  portupgrade may see those py26- packages as needing to be rebuilt for py27-.


----------

