# Where to learn pkg rquery syntax?



## Bront_in_Hood (Dec 12, 2013)

The story began with me trying to install Banshee with PKGNG: `# pkg install banshee`. To my surprise PKGNG did not find any package to install and informed me about this fact. So I decided to search through the entire PKG repository for a package with a name like "banshee". I perused the wiki page about using PKGNG and found the command pkg rquery. I even opened a man page for pkg-rquery. There are many options like "%n" but no any example of correct syntax how to use that. I tried some things. For example:

`#pkg rquery %n ktorrent` returned "ktorrent". Excellent! Lets try my beloved "banshee":
`#pkg rquery %n banshee` returned nothing.
Ok. I know that there are Perl packages of different versions there. Lets try `#pkg rquery %n perl`:  nothing in return.
I understand that I need to know the correct syntax of the pkg rquery command. But googling did not give something bright. Where can I learn about how to find a package with a name like [something]? What do you think, maybe it will be cool to have some examples of pkg rquery usage in man pages?


----------



## SirDice (Dec 12, 2013)

Bront_in_Hood said:
			
		

> Where can I learn about how to find package with name like [something]?


Try `pkg search banshee`, see pkg-search(8). You can probably do it with pkg-rquery(8) too but I think it's mainly meant to be used in scripts.


----------



## Bront_in_Hood (Dec 13, 2013)

Yes. I could search a port with like-name using pkg search. I did not fix it out through inattention. Now I see that Banshee is not in the pkg repository. But I'm still interested in where to learn pkg rquery syntax. And maybe not only me but everybody who wants to use pkg rquery and found this topic. Let's keep on target of this topic. Is there any bright and complete manual with examples how to write "rqueries"?


----------



## kpa (Dec 13, 2013)

It's documented in the pkg-query(8) manual page. Note the man link does not work yet because the PKG manual pages have not been added yet.


----------

