Querying for package data is only one of the steps that take place when you manage packages, although it has arguably the most options of all the tasks RPM performs.
It’s important that you understand the difference between packages installed on the system (that appear in the RPM database) and packages that exist simply as files on the disk or other resource. The chief difference in the rpm command’s usage is the addition of the -p option to specify that the package being acted on is a file on disk.
The most basic of all queries is to check to see whether a particular package is installed:
# rpm -q coglcogl-1.18.2-9.fc21.x86_64
Simply by adding a few modifier characters to this query, you can gather much more information about ...