upgrading ports after system upgrade to 11.0

Brandon J. Wandersee brandon.wandersee at gmail.com
Thu Nov 10 14:23:19 UTC 2016

Christoph P.U. Kukulies writes:

> I stepwise upgraded a 9.2 FreeBSD to 10.3 and now the last step is to go 
> to 11-RELEASE.
> After that will be acomplished I'd like to upgrade my /usr/ports tree, 
> that is, update all ports and build
> and install those which had been actually built and installed.
> What would the commands be to achieve this?

That would all depend on how you fetched your ports tree, and how you
prefer to install ports. The /Handbook/ has a chapter on the two methods
of maintaining the ports tree and basic information on installing and
maintaining ports.

If you don't have many (or any) custom ports then I'd suggest just using
pkg(8) to upgrade everything you have installed. If you have any (or
many) custom ports then you can worry about them later; if you don't
need custom ports, stick with packages.

ports-mgmt/portmaster and ports-mgmt/portupgrade have been popular
stand-alone tools for managing ports; ports-mgmt/synth and
ports-mgmt/poudriere have become more popular, and can be used to build
a list of ports into a local package repository from which you can
upgrade. Poudriere is probably the closest thing to an "official"
FreeBSD ports management tool, since it's used to maintain the official
package repository; Synth is probably the better choice if you're
managing a single machine.

Also, I personally use `pkg query -e '%a = 0' %o > pkglist` to keep an
alphabetical list of all explicitly installed ports. Makes it easy to
just uninstall and reinstall everything if there's a need for a major
cleanup or massive upgrade.

::  Brandon J. Wandersee
::  brandon.wandersee at gmail.com
::  --------------------------------------------------
::  'The best design is as little design as possible.'
::  --- Dieter Rams ----------------------------------

More information about the freebsd-questions mailing list