You can query the RPM database to determine the installed version of RPMs.
To query the description tag from an installed RPM, use the following command:
rpm -q --queryformat ’%{DESCRIPTION}\\n’ sun-mq |
This output shows a Version 3.7 UR1 sun-mq RPM.
SUNW_PRODVERS=3.7.0.1 |