RPM Package Manager #
rpm
Querying packages #
Query Options | Description |
---|---|
-q (--query ) |
Queries and displays packages |
-qa (--query --all ) |
Lists all installed packages |
-qc (--query --configfiles ) |
Lists configuration files in a package |
-qd (--query --docfiles ) |
Lists documentation files in a package |
-qf (--query --file ) |
Exhibits what package a file comes from |
-qi (--query --info ) |
Shows installed package information |
-qip (--query --info --package ) |
Shows installable package information |
-ql (--query --list ) |
Lists all files in a package |
-qR (--query --requires ) |
Lists files and packages a package depends on (requires) |
-q --whatprovides |
Lists packages that provide the specified package or file |
-q --whatrequires |
Lists packages that require the specified package or file |
Package management #
Install/Remove Options | Description |
---|---|
-e (--erase ) |
Removes a package |
--force |
Installs and replaces a package or files of the same version |
-F (--freshen ) |
Upgrades an installed package |
-h (--hash ) |
Shows installation progress with hash marks |
-i (--install ) |
Installs a package |
--import |
Imports a public key |
-K |
Validates the signature and package integrity |
-U (--upgrade ) |
Upgrades an installed package or loads it if it is not already installed |
-v (--verbose ) or -vv |
Displays detailed information |
-V (--verify ) |
Verifies the integrity of a package or package files |
Manually extract files from a package #
- rpm2cpio (8) - Extract cpio archive from RPM Package Manager (RPM) package.
- cpio (1) - copy files to and from archives
[akraker@server1 ~]$ sudo rpm2cpio /mnt/BaseOS/Packages/chrony-4.3-1.el9.x86_64.rpm | cpio -imd
1253 blocks
RHEL GPG Keys #
[root@server1 ~]# ll /etc/pki/rpm-gpg/
total 8
-rw-r--r--. 1 root root 1669 Sep 27 02:56 RPM-GPG-KEY-redhat-beta
-rw-r--r--. 1 root root 3682 Sep 27 02:56 RPM-GPG-KEY-redhat-release
- rpmkeys (8) - RPM Keyring