$ curl cheat.sh/
 cheat:rpm 
---
tags: [ packaging ]
---
# To install a package:
rpm -ivh <rpm>

# To update a package:
rpm -Uv <rpm>

# To remove a package:
rpm -e <package>

# To remove a package, but not its dependencies
rpm -e --nodeps <package>

# To find what package installs a file:
rpm -qf <file>

# To find what files are installed by a package:
rpm -ql <package>
rpm -qpl <rpm>

# To find what packages require a package or file:
rpm -q --whatrequires <package>
rpm -q --whatrequires <file>

# To list all installed packages:
rpm -qa

# To find a packages's dependencies:
rpm -i --test <package>

# To display checksum against a source:
rpm -K <package>

# To verify a package:
rpm -V <package>

 tldr:rpm 
# rpm
# RPM Package Manager.
# For equivalent commands in other package managers, see <https://wiki.archlinux.org/title/Pacman/Rosetta>.
# More information: <https://rpm.org/>.

# Show version of httpd package:
rpm --query httpd

# List versions of all matching packages:
rpm --query --all 'mariadb*'

# Forcibly install a package regardless of currently installed versions:
rpm --upgrade package_name.rpm --force

# Identify owner of a file and show version of the package:
rpm --query --file /etc/postfix/main.cf

# List package-owned files:
rpm --query --list kernel

# Show scriptlets from an RPM file:
rpm --query --package --scripts package_name.rpm

# Show changed, missing and/or incorrectly installed files of matching packages:
rpm --verify --all 'php-*'

# Display the changelog of a specific package:
rpm --query --changelog package_name

$
Follow @igor_chubin cheat.sh