How to check which package a specific file belongs to in FreeBSD - "pkg_info -W"
Whenever you need to know what package installed a specific file in FreeBSD, "pkg_info" can be used.
Quote:
-W, --which filename
For the specified filename argument show which package it belongs
to. If the file is not in the current directory, and does not
have an absolute path, then the directories specified in the
environment variable PATH are searched using which(1).
This is how to list files installed by pixman package:
Code:
# pkg_info -L pixman-0.18.4
Information for pixman-0.18.4:
Files:
/usr/local/include/pixman-1/pixman-version.h
/usr/local/include/pixman-1/pixman.h
/usr/local/lib/libpixman-1.a
/usr/local/lib/libpixman-1.la
/usr/local/lib/libpixman-1.so
/usr/local/lib/libpixman-1.so.9
/usr/local/libdata/pkgconfig/pixman-1.pc
And below is how to check which package installed the file "/usr/local/libdata/pkgconfig/pixman-1.pc"
Code:
# pkg_info -W /usr/local/libdata/pkgconfig/pixman-1.pc
/usr/local/libdata/pkgconfig/pixman-1.pc was installed by package pixman-0.18.4