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:
- 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
- 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
- Find the
url
line and change the keyword fromquarterly
tolatest
. For example:
FIND:
url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",
REPLACE/UPDATED/EDIT:
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
- Save and close the file.
- 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!