How to install the latest version of software in FreeBSD?

I guess that you're installing packages from the quarterly branch.

The quarterly branch does not always have the latest software, which is why it is regarded more stable than the latest branch. The newest one is 2018Q1 currently and as you can see here the newest haproxy is not there yet.

You may switch to the latest branch as described in the "PKG Repository Changed to Quarterly in 10.2?" thread on FreeBSD Forums.

Put the following code into /usr/local/etc/pkg/repos/FreeBSD.conf:

FreeBSD: {
    url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"
}

It is generally recommended to store your installed software configuration files under /usr/local. This way it is easier to separate those settings from the configuration files of software shipped with FreeBSD. pkg(8) is somewhat special. Although being an essential utility it is not installed by default (it has to be bootstraped using pkg(7)). This is why its configuration files fit both /etc and /usr/local/etc.


See also:

  • pkg.conf(5)

Check what package repository are you using:

cat /etc/pkg/FreeBSD.conf

Make sure you have url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest" in there, not quarterly.