Multiple pkg repositories

Steve O'Hara-Smith steve at
Mon Dec 2 15:17:45 UTC 2013

On Mon, 02 Dec 2013 13:55:32 +0000
Matthew Seaman <m.seaman at> wrote:

> On 12/02/13 10:43, Steve O'Hara-Smith wrote:
> > 	Hi,
> > 
> > 	I see with the pkg-1.2 there is support for using multiple
> > repositories. What is not clear is how to control the search order in
> > these repositories. I'd like to arrange that my local repository is
> > searched first with a fallback to the official repository, primarily so
> > that I can avoid compiling some of the monsters like libreoffice,
> > firefox etc. while still having packages with my selected options and
> > custom patches where I want them.
> > 
> > 	Anyone know if it's possible to set this up reliably ?
> Repositories are searched in order of the names of the .conf files in
> /usr/local/etc/pkg/repos -- not sure how adding /etc/pkg/FreeBSD.conf
> into that mix affects things though.  However you can easily test as
> it's also the order that repositories are listed in the 'pkg -vv' output.

	Thank you.

> You should also be aware of using 'pkg annotate' to force a package to
> be installed from a specific repository.  See the section 'WORKING WITH
> MULTIPLE REPOSITORIES' in pkg-repository(5).

	Ah, I'd missed that man page - useful. After reading it I think
you're right that pkg annotate is the way to go to get reliable behaviour,
that feature of always pulling the latest version no matter which
repository it appears in may spoil my game otherwise.

Steve O'Hara-Smith <steve at>

More information about the freebsd-questions mailing list