How can you check if an RPM is already installed on a Linux machine?

rpm -q pkge_name
this com

mand will query the specifid package if it is already existing,otherwise it will give message that package is
not installed.