pkg provides
—
query which package provides a file matching a particular
pattern
pkg provides |
[-r repo]
pattern |
pkg provides
is used to query which
package in your pkg catalog provides a particular file given a pattern.
The search pattern can be any perl compatible regular expression
(PCRE).
The following options are supported by pkg
provides
:
-u
- Check if a new database file is available and then perform the
update.
-f
- Force the update.
-r
repo
- Restrict search results to a specific repository.
- pattern
- Can be any perl compatible regular expression (PCRE). The search is not
case sensitive.
- PROVIDES_FETCH_ON_UPDATE
- If set to "NO", it disables the default behaviour and doesn't
perform a
pkg provides
database update after
updating pkg.
- PROVIDES_SRV
- When set, overrides the default
pkg provides
server address. The default value is
"https://pkg-provides.osorio.me".
- PROVIDES_FILEPATH
- When set, overrides the default database file location in the remote
server. The filepath format is the following : v3/{osname}/{osver}:{arch}.
The default value is "v3/FreeBSD/12:amd64" for a FreeBSD 12 and
"v3/DragonFly/6.2:x86:64" for a DragonFly 6.2.
- PROVIDES_URL
- This environment variable is deprecated. Use PROVIDES_SRV
instead.
The pkg provides
utility exits 0 on
success, and >0 if an error occurs.
Update the provides database:
$ pkg provides -u
Search for a package that provides bin/firefox
$ pkg provides
bin/firefox$
Search for packages that provide a file with the pattern
libbz2.so.*
$ pkg provides
^libbz2.so.
Look for bin/firefox but only in the
FreeBSD repository
$ pkg provides -r FreeBSD
bin/firefox$
pkg provides
was written
by Rodrigo Osorio <rodrigo@FreeBSD.org>.