Skip to main content

rpm is a Package Manager for Red Hat, Suse and Fedora Linux.

# To show version of httpd package:
rpm -q <httpd>

# To list versions of all matching packages:
rpm -qa '<mariadb*>'

# To forcibly install a package regardless of currently installed versions:
rpm -U <package_name.rpm> --force

# To identify owner of a file and show version of the package:
rpm -qf </etc/postfix/main.cf>

# To list package-owned files:
rpm -ql <kernel>

# To show scriptlets from an RPM file:
rpm -qp --scripts <package_name.rpm>

# To show changed, missing and/or incorrectly installed files of matching packages:
rpm -Va '<php-*>'