rh124_rpm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
rh124_rpm [2026/10/19 20:13] – created rpjdayrh124_rpm [2026/10/19 20:36] (current) – [Querying an installed package] rpjday
Line 1: Line 1:
 ====== RHEL 10 rpm command ====== ====== RHEL 10 rpm command ======
 +
 +===== Examine installed RPM packages =====
 +
 +<code>
 +$ rpm -qa
 +$ rpm -qa | wc -l
 +$ rpm -qa "*kernel*"
 +</code>
 +
 +===== Possible contents of an RPM package =====
 +
 +  * binary executables
 +  * shared libraries
 +  * man pages/info files/doc files
 +  * configuration files
 +  * systemd files
 +
 +===== Querying an installed package =====
 +
 +General information about the package:
 +
 +<code>
 +$ rpm -qi setup
 +Name        : setup
 +Version     : 2.14.5
 +Release     : 7.el10
 +Architecture: noarch
 +Install Date: Sat 17 Oct 2026 12:17:46 PM
 +Group       : System Environment/Base
 +Size        : 737783
 +License     : LicenseRef-Fedora-Public-Domain
 +Signature   :
 +              RSA/SHA256, Fri 06 Jun 2025 09:44:36 AM, Key ID dee5c11cc2a1e572
 +              RSA/SHA256, Fri 06 Jun 2025 09:44:37 AM, Key ID dee5c11cc2a1e572
 +Source RPM  : setup-2.14.5-7.el10.src.rpm
 +Build Date  : Thu 05 Jun 2025 03:29:25 PM
 +Build Host  : s390x-builder02.almalinux.org
 +Packager    : AlmaLinux Packaging Team <packager@almalinux.org>
 +Vendor      : AlmaLinux
 +URL         : https://pagure.io/setup/
 +Summary     : A set of system configuration and setup files
 +Description :
 +The setup package contains a set of important system configuration and
 +setup files, such as passwd, group, and profile.
 +</code>
 +
 +Runtime dependencies of the package:
 +
 +<code>
 +$ rpm -qR tree
 +</code>
 +
 +===== Mapping packages to files and vice versa =====
 +
 +List the files in a package (you've seen this before):
 +
 +<code>
 +$ rpm -ql shadow-utils | less
 +</code>
 +
 +Identify the package containing a file:
 +
 +<code>
 +$ rpm -qf /etc/passwd
 +setup-2.14.5-7.el10.noarch
 +$
 +</code>
  • rh124_rpm.1792440818.txt.gz
  • Last modified: 2026/10/19 20:13
  • by rpjday