-.\" $OpenBSD: pkg_info.1,v 1.63 2020/02/19 14:24:19 espie Exp $
+.\" $OpenBSD: pkg_info.1,v 1.64 2022/05/29 10:58:03 schwarze Exp $
.\"
.\" Documentation and design originally from FreeBSD. All the code has
.\" been rewritten since. We keep the documentation's notice:
.\" Jordan K. Hubbard
.\"
.\"
-.Dd $Mdocdate: February 19 2020 $
+.Dd $Mdocdate: May 29 2022 $
.Dt PKG_INFO 1
.Os
.Sh NAME
.Op Fl E Ar filename
.Op Fl e Ar pkg-name
.Op Fl l Ar str
-.Op Fl Q Ar query
+.Op Fl Q Ar substring
.Op Fl r Ar pkgspec
.Op Ar pkg-name ...
.Ek
.Xr pkgpath 7
for each package.
You can easily build a subdirlist with this.
-.It Fl Q Ar query
-Show packages in the package search path which match the given
-.Ar query .
-Specifically, show all packages in the first repository that matches
-the query.
+.It Fl Q Ar substring
+Show the names of all packages in the first repository
+of the package search path containing the
+.Ar substring
+in the stems of their package names.
+A stem is a package name with all version and flavor suffixes removed; see
+.Xr pkg_add 1
+for more details on stems.
If
.Fl a
-is also specified, show all packages in all repositories instead.
+is also specified, show the names of all matching packages
+in all repositories instead.
.It Fl q
Be
.Dq quiet