3

The pkg tool in FreeBSD is usually set to draw upon either the quarterly or latest package set. The latest set may churn more often with updates, while the quarterly is meant to be more stable but not the very latest.

➥ How can I switch from one to the other?


Or maybe not?

1 Answer 1

5

As discussed in the forums, in FreeBSD 10.2, the default changed from latest to quarterly. You may choose to use either.

To quote the 10.2 Release Notes:

The default pkg(8) repository set in /etc/pkg/FreeBSD.conf now defaults to the quarterly package set. To use the latest branch (as was the previous default), the comment at the top of /etc/pkg/FreeBSD.conf explains how to disable the default repository and specify an alternative repository. [r285830] (Sponsored by The FreeBSD Foundation)

The contents of that .conf file in FreeBSD 11.2:

# $FreeBSD: releng/11.2/etc/pkg/FreeBSD.conf 333474 2018-05-10 23:58:33Z gjb $
#
# To disable this repository, instead of modifying or removing this file,
# create a /usr/local/etc/pkg/repos/FreeBSD.conf file:
#
#   mkdir -p /usr/local/etc/pkg/repos
#   echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
#

FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}

As noted in that quote, you need not modify the original file. Instead, create a new file in a different location, based on the original. Then change the “quarterly” to “latest” within that JSON-like text at the bottom.

mkdir -p /usr/local/etc/pkg/repos
echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf

Then change the “quarterly” to “latest” in the url: line of that JSON-like text at the bottom.

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

For more info about the locations of these files, see this Answer by Mateusz Piotrowski on a related Question.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .