Search for locally installed packages that own the file pattern, similar to
- dpkg --search PATTERN
- apt-cache search PATTERN
- yum whatprovides PATTERN
- pacman --query --owns PATTERN
% brew tap ten0s/brew-cache
% brew cache
Usage: brew cache [options]
Query the local Homebrew packages cache
-u Update/build the local packages cache
-s [/]pattern[/] Search for packages that own the file
pattern
-d Display any debugging information
-q Make some output more quiet
-v Show version
-h, --help Show this message
% brew cache -u
Building cache: fcbb2f2ca6958fa9218c035e8cfef96cd6e92164
Cache: fcbb2f2ca6958fa9218c035e8cfef96cd6e92164 is built
% brew cache -u
Current cache: fcbb2f2ca6958fa9218c035e8cfef96cd6e92164
Cache: fcbb2f2ca6958fa9218c035e8cfef96cd6e92164 is up-to-date
% brew cache -s 'gtk'
cairo 1.16.0_5
gettext 0.21.1
gtk+3 3.24.35
meson 0.64.1
% brew cache -s 'lib/libgtk-3.dylib'
gtk+3 3.24.35
$ brew cache -s 'gtk'
at-spi2-atk 2.38.0
cairo 1.16.0_5
gettext 0.21.1
gtk+3 3.24.35
libxml2 2.10.3_1
libxslt 1.1.37_1
meson 0.64.1
$ brew cache -s 'lib/libgtk-3.so'
gtk+3 3.24.35
% brew cache -s '/lib\/gtk.*/'
gtk+3 3.24.35
$ brew cache -s '/lib\/gtk.*/'
at-spi2-atk 2.38.0
gtk+3 3.24.35
The project is licensed under the 2-Clause BSD License.
See LICENSE or
https://spdx.org/licenses/BSD-2-Clause.html
for full license information.