Get list of packages installed from a given repo

Luca Pizzamiglio pizzamig at freebsd.org
Thu Sep 28 15:34:30 UTC 2017


Hi Mel,

the %R keyword is available in the query format, but is not available
in the evaluation.

you can use something like that:

# pkg query "%R %o" | grep -v ^FreeBSD
# pkg query "%R %o" | grep ^local

Best regards,
pizzamig

On Sun, Sep 17, 2017 at 8:33 PM, Mel Pilgrim
<list_freebsd at bluerosetech.com> wrote:
> I maintain local repos on top of the public pkg repo, and I want to check
> which pkgs were installed from which repos.  I know pkg knows this
> information (the %R query keyword), but this doesn't work:
>
> # pkg query -e '%R !~ FreeBSD' %o
> malformed evaluation string
> # pkg query -e '%R ~ local' %o
> malformed evaluation string
>
> How do I query for a list of installed pkgs based on an evaluation of the
> repo name?
> _______________________________________________
> freebsd-pkg at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-pkg
> To unsubscribe, send any mail to "freebsd-pkg-unsubscribe at freebsd.org"


More information about the freebsd-pkg mailing list