pkg- searching by (partial) origin|category for installed packages/ports

@lbutlr kremels at
Sun Mar 21 17:00:52 UTC 2021

On 20 Mar 2021, at 04:50, parv/freebsd <parv.0zero9+freebsd at> wrote:
> How does one search for a installed port or package by (partial)
> origin/category? Failed attempts ...

I found searching ports very frustrating, so years ago I came up with this, which is not how anyone suggested I do this, instead suggesting a myriad of make and pig commands all of which did slightly different things and none what I wanted.

 # cat /usr/local/bin/pfind

find /usr/ports -mindepth 2 -maxdepth 2 -iname "*${TERM}*" | grep -v distfiles

 # pfind x11 | grep wm
 # pfind wm | grep x11
. . .
. . .

Works for me. YMMV.

Y is for YORRICK whose head was knocked in
Z is for ZILLAH who drank too much gin

More information about the freebsd-questions mailing list