quick tip: how do you find out which packages were installed from a repository?

Sunday, January 03 2016 @ 19:38 CET

Contributed by: tingo

So, if you use both pkg and ports in FreeBSD, how do you tell which packages were installed from a repository, and which you installed from source (via the ports tree)?

Turns out you can do it with pkg query, like this: pkg query 'Package %n-%v installed from %R'.
For packages installed from a repository you will get something like this:


root@kg-vm2#  pkg query 'Package %n-%v installed from %R' 
Package ORBit2-2.14.19_1 installed from FreeBSD
Package Thunar-1.6.10_1 installed from FreeBSD
Package adwaita-icon-theme-3.16.2.2 installed from FreeBSD
Package argyllcms-1.7.0_1 installed from FreeBSD
Package at-spi2-atk-2.16.0 installed from FreeBSD
Package at-spi2-core-2.16.0 installed from FreeBSD
Package atk-2.16.0 installed from FreeBSD
and packages installed from the ports tree will show this:

root@kg-core1#  pkg query 'Package %n-%v installed from %R' 
Package CoinMP-1.8.3 installed from unknown-repository
Package ImageMagick-6.9.2.10,1 installed from unknown-repository
Package ORBit2-2.14.19_1 installed from unknown-repository
Package OpenEXR-2.2.0_5 installed from unknown-repository
Package OpenSP-1.5.2_2 installed from unknown-repository
Package Thunar-1.6.10_1 installed from unknown-repository
Package a2ps-4.13b_8 installed from unknown-repository
Package aalib-1.4.r5_11 installed from unknown-repository
This can be handy to know.

0 comments



http://geekinfo.net/article.php?story=20160103193806299