How to switch pkg from stable quarterly to latest on FreeBSD

Does anyone know how to switch the pkg command from stable quarterly release to latest on FreeBSD 13.1 running on EC2?

The procedure to use the latest packages instead of quarterly on the FreeBSD server/workstation/desktop is as follows:

  1. Copy the /etc/pkg/FreeBSD.conf
sudo mkdir -p /usr/local/etc/pkg/repos/
sudo cp /etc/pkg/FreeBSD.conf /usr/local/etc/pkg/repos/FreeBSD.conf
  1. Edit the /usr/local/etc/pkg/repos/FreeBSD.conf using a text editor such as vim/vi/nano/emacs etc. For example:
sudo vim /usr/local/etc/pkg/repos/FreeBSD.conf
  1. Find the url line and change the keyword from quarterly to latest. For example:
    FIND:
url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",

REPLACE/UPDATED/EDIT:

url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  1. Save and close the file.
  2. Run the pkg update command and grab to latest packages:
sudo pkg update
sudo pkg upgrade

This is not limited to AWS EC2. Read pkg.conf man page pkg.conf:

man pkg.conf

Blockquote

mkdir -p /usr/local/etc/pkg/repos
cat > /usr/local/etc/pkg/repos/FreeBSD.conf << EOF
FreeBSD: {
    url: "pkg+http://pkg.FreeBSD.org/\${ABI}/latest"
}
EOF
1 Like

@Florian_LALUQUE Don’t you need an entire config file? If not, that is cool. Thanks!