Ten Useful RPM (RPM Package Manager) Usage Examples

RPM is the underlying package management system used on CentOS Linux. In this post, we’ll go through a couple of common RPM usage examples:

1. List all packages:

rpm -qa

2. List a specific package:

rpm -qa | grep PACKAGE_NAME

3. Install an RPM package:

rpm -ivh PACKAGE_NAME.rpm

4. Install OR upgrade an existing RPM package:

rpm -Uvh PACKAGE_NAME.rpm

5. Remove an RPM package:


6. Remove an RPM package without removing dependencies:

rpm -e --nodeps PACKAGE_NAME

7. List the package that a particular file or directory belongs to:

rpm -qf /path/to/file

8. List all the files of a particular RPM package:


9. Verify an RPM package (output will show files that have changed):


10. Verify all RPM packages (output will show files that have changed):

rpm -qaV
Scan to Donate Bitcoin
Like this? Donate Bitcoin to at:
Bitcoin 13KzxfEoFPzt5ccoQvSkUEytTgQV8JN5ej
Share This Post

About Author: Curtis K

Hi! My name is Curtis, and I am the creator of CentOS Blog. Please feel free to comment any suggestions, feedback or questions on my posts!