There are several methods to check whether the package is installed or not. To understand, just see the below steps.
1) Method 1 –If the command is executed successfully then after running the yum command it will show ‘0’ on checking the exit status.
2) Method 2-You can run the rpm and –qa test.
3) Method 3–In the yum log, check if any entry is installed in the directory.