That's because -a is the select option. Before you can use the select option, you must use tell rpm in what mode you want it to be: -q=query mode. After the mode indication you can do deveal things: -qa= query all packages, -qa apackage= query all packages and show only apackage, -qa|grep apackage does the same. See 'man rpm'.
select option
|