# Get package licence



## djura (Apr 3, 2011)

Hello,

I need to known licenses of my FreeBSD installation for legal reasons.

*pkg_info* returns the installed packages, it's fine, but how to determine the license (such as BSD, LGPL, ...)? Using a web api?

Thanks in advance.


----------



## Beastie (Apr 3, 2011)

I don't think it's possible. Some packages include the license, others don't. And if they do, the location and filename is not standard anyway. It all depends on the package.

The easiest way is to visit the software website or check Wikipedia yourself. The website, when available, can be found at the bottom of the *Long description* in the ports/packages collection repository, e.g. Qemu.


----------



## dandelion (Apr 3, 2011)

bsd.licenses.mk stores copies of license file(s) under share/licenses/${PKGNAME} for each package. A few idiosyncratic ports may install license file under share/doc but otherwise you'd need to check contents of distfiles of the installed ports.


----------

