pkg show category

How to list all packages in a category?

for example, If you haven't ports installed, how to list all packages within ftp category ?
 
Code:
pkg search -o filezilla
ftp/filezilla                  Fast and reliable cross-platform FTP, FTPS, and SFTP client
ftp/libfilezilla               C++ library for building platform-independent programs

Look in pkg help search.
 
I have made a mistake and changed the question:

for example if you want to list all packages in www category using pkg?
how to do without going to /usr/ports/www ?
 
Ok thanks!

last question:
how to show all categories using pkg?
I have tried with pkg rquery '%C' | sort -u, it works but result are not equal to directories in /usr/ports/
other ways to get categories list?
 
using this command pkg rquery '%C' | sort -u I see for example zope, which is not in /usr/ports
Yes, zope is a virtual category. There is no corresponding ports directory but ports/packages are still classified as belonging to it.

Try this: pkg rquery '%o' | cut -d/ -f1 | sort -u
 
One moment:
# pkg search filezilla
filezilla-3.24.0_2 Fast and reliable cross-platform FTP, FTPS, and SFTP client
..

# pkg search -o filezilla
ftp/filezilla Fast and reliable cross-platform FTP, FTPS, and SFTP client
...


Using -o, how to show also the version of the package?
 
how about:

sqlite3 -list /var/db/pkg/repo-FreeBSD.sqlite 'SELECT version FROM packages WHERE name="filezilla";'

The above command shows the version in the repository while the following command shows the installed version:

sqlite3 -list /var/db/pkg/local.sqlite 'SELECT version FROM packages WHERE name="filezilla";'
 
Back
Top