# pkg prime-list



## balanga (Dec 5, 2021)

I have just run `pkg prime-list` on two FreeBSD 12.1-RELEASE systems and it works OK on one, but am told '*unknown command*' on the other.

How do I go about making this command work on the other?


----------



## Alain De Vos (Dec 5, 2021)

You could try:

```
pkg query -e '%a = 0' '%n'
```


----------



## balanga (Dec 5, 2021)

Alain De Vos said:


> You could try:
> 
> ```
> pkg query -e '%a = 0' '%n'
> ```


Is `pkg prime-list` simply a synonym for this?


----------



## Alain De Vos (Dec 5, 2021)

Yes


----------



## Erichans (Dec 6, 2021)

See also pkg.conf(5) and pkg-alias(8); local aliases defined in /usr/local/etc/pkg.conf

Edit:
If you do not know that *prime-list* in `pkg prime-list` is a _*local alias*_ for use with `pkg`, it is rather difficult to find the right information. `apropos prime-list` does not give usefull hints.

While pkg(8) does mention the subcommand *alias*, you might not realise that *prime-list* is a local alias. The subcommand *help* points you in the right direction:

```
% pkg help prime-list
`prime-list` is an alias to `query -e '%a = 0' '%n'`
```


----------

