Alessandro Dotti Contra

Linux/Unix DevOps


NetBSD: upgrade installed packages from source

If you need to upgrade the installed packages on a NetBSD system, you can follow this procedure.

Set cvs environment variables

Put in your .bashrc the following lines:

export CVSROOT="anoncvs@anoncvs.NetBSD.org:/cvsroot"
export CVS_RSH="ssh"

Update the sources

$ cd /usr/pkgsrc
$ cvs -q update -dP

Upgrade the packages

Refresh the list of installed packages:

$ /usr/pkg/sbin/pkg_chk -g

The list is saved in /usr/pkgsrc/pkgchk.conf

Finally, perform the actual upgrade:

$ /usr/pkg/sbin/pkg_chk -us