Updating packages in bsd

This made me to resolve to write a basic shell script to download a package and its dependencies for a Free BSD 10 machine. However, when I started dwelling deeper I noticed Free BSD’s pkg already had it covered! The following packages will be fetched: New packages to be FETCHED: . There is a gotcha which I had not covered as I had not faced it ;), the default Free BSD repository is pointed to the quarterly release branch, that is applications are updated once in three months or so.

🙂 You need following: # mkdir /root/off-pac # pkg fetch -d -o /root/off-pac vlc Updating Free BSD repository catalogue… But as the RELEASE disc comes with a fixed package set, using applications from the quarterly can cause issues, especially with the dependencies. In my example I had tried this on Free BSD RELEASE 10.2, but some of the libraries were old by the time I started downloading packages from the official quarterly repository.

The pkg(8) tool called "pkg" is a modern and fast binary package manager.

It was developed for Free BSD, but PC-BSD used it in production first, followed soon after by Dragon Fly.

The files ending in the ".sample" extension are ignored; pkg(8) only reads files that end in ".conf" and it will read as many as it finds.

The default is to use the California-based Avalon, which is also the master.

For fresh installations, the file /usr/local/etc/pkg/repos/sample is copied to /usr/local/etc/pkg/repos/df-latest so that pkg(8) works out of the box.

Upgrades from earlier releases, however, will not have it.

If the "pkg" program is missing on the system for any reason, it can be quickly bootstrapped without having to build it from source or even having dports installed: After any installation or reinstallation of the pkg(8) package, you may want to open review the configuration files to customize it, e.g. The pkg(8) program has a configuration file at /usr/local/etc/(the default installation is typically fine and requires no alteration).

In the above case, a custom repository configuration file should be created, and it should include the "priority" field, e.g. Packages can be upgraded to newer versions with pkg(8). The local package can be upgraded to the new version: : When changing package origins, in most cases it is important to reinstall packages that are dependent on the package that has had the origin changed.

To force a reinstallation of dependent packages, type: Several people have run into problem upgrading binary packages when default versions change (e.g.

base userland and kernel updates installed ...] # pkg update [...

Please or register to post comments
If spammers comment on your content, only you can see and manage such comments Delete all

Updating packages in bsd introduction

Updating packages in bsd

Recent posts

15-Oct-2018 11:26
15-Oct-2018 13:00
15-Oct-2018 14:21
15-Oct-2018 19:32
16-Oct-2018 01:33
16-Oct-2018 06:44