RPM(8)
โจ rpm โ RPM Package Manager โจ
okay bestie, gather round ๐ this is RPM(8), straight outta the System Manager's Manual, and it's literally the whole personality of rpm โ the RPM Package Manager. She builds, she installs, she queries, she verifies, she updates, she erases. She does it all and she does it flawlessly. Let's get into it ๐ซถ
๐ธ NAME ๐ธ
rpm โ RPM Package Manager
๐ SYNOPSIS ๐
๐ฆ Querying and verifying packages
rpm {-q|--query} [select-options] [query-options] [PACKAGE_FILE ...]
[PACKAGE_NAME ...]
rpm {-V|--verify} [select-options] [verify-options] [PACKAGE_NAME ...]
๐ฆ Installing, upgrading and removing packages
rpm {-i|--install} [transaction-options] [install-options] PACKAGE_FILE
...
rpm {-U|--upgrade} [transaction-options] [install-options] PACKAGE_FILE
...
rpm {-F|--freshen} [transaction-options] [install-options] PACKAGE_FILE
...
rpm --reinstall [transaction-options] [install-options] PACKAGE_FILE ...
rpm --restore [transaction-options] [select-options] PACKAGE_NAME ...
rpm {-e|--erase} [transaction-options] [erase-options] PACKAGE_NAME ...
๐ฆ Misc operations
rpm --querytags
See rpm-common(8) for operations common to all rpm executables. ๐
๐ DESCRIPTION ๐
okay so rpm is a powerful Package Manager, no cap. She can be used to build, install, query, verify, update, and erase individual software packages. Main character energy, truly.
A package consists of an archive of files and meta-data used to install and erase the archive files. The meta-data includes helper scripts, file attributes, and descriptive information about the package. So the package is like โ the files, plus the little lore document explaining the files. Obsessed.
Packages come in two varieties:
- binary packages โ used to encapsulate software to be installed ๐
- source packages โ containing the source code and recipe necessary to produce binary packages ๐ง
๐ OPERATIONS ๐
๐ Querying and verifying packages
-V,--verifyโ Verify package(s), comparing information about the installed files in the package with information about the files taken from the package metadata stored in the rpm database. Among other things, verifying compares the size, digest, permissions, type, owner and group of each file. Any discrepancies are displayed. She's doing a full vibe check on your files, basically ๐-q,--queryโ Query package files or installed package(s). Ask her anything, she'll tell you ๐
๐ Installing, upgrading and removing packages
-i,--installโ Install new package(s) without considering upgrade scenarios. Heads up bestie, this is considered special usage โ normally installations should be done with--upgrade.-U,--upgradeโ Install or upgrade package(s) to a newer version. Old and/or obsoleted package(s) are removed after the new package is installed. Glow-up achieved โจ-F,--freshenโ Upgrade package(s), but only ones for which an earlier version is installed. She's selective, she's picky, she ate.--reinstallโ Reinstall previously installed package(s). Round two, no notes.--restoreโ Restore file metadata such as timestamp, owner, group, permissions and capabilities of files of installed package(s). Turning back the clock on your file metadata, iconic ๐ธ-e,--eraseโ Erase installed packages. bye bestie ๐ซถ
๐ Misc operations
--querytagsโ Dump known querytags. Useful with the--queryformatoption. She's dumping everything she knows, and she knows a lot.
๐ Obsolete compatibility aliases
okay so these are obsolete popt(3) aliases for backwards compatibility only, and their use is discouraged. Like wearing low-rise jeans to a 2025 party. It's giving y2k, but not in a cute way ๐
--initdb,--rebuilddb,--verifydbโ Seerpmdb(8).--addsign,--delsign,--resignโ Seerpmsign(1).-K,--checksig,--importโ Seerpmkeys(8).--specfileโ Seerpmspec(1).
See rpm-common(8) for the operations common to all rpm executables.
๐ง ARGUMENTS ๐ง
PACKAGE_FILEโ Either an rpm package or anrpm-manifest(5)file. May also be specified as an ftp or http URL, in which case the package will be downloaded before being installed. See FTP/HTTP OPTIONS for information on rpm's ftp and http client support. She'll go get it herself, periodt ๐PACKAGE_NAMEโ Installed package namedPACKAGE_NAME. To specify the package more precisely the package name may be followed by the version or version and release both separated by a dash, or an architecture name separated by a dot. See the output ofrpm -qaorrpm -qp PACKAGE_FILEas an example. Precision is the moment ๐
๐ OPTIONS ๐
See rpm-common(8) for the options common to all operations. Those ones are shared, these ones are her specials.
๐ฅ INSTALL AND UPGRADE OPTIONS ๐ฅ
--allfilesโ Installs or upgrades all themissingokfiles in the package, regardless if they exist.--badrelocโ Used with--relocate, permit relocations on all file paths, not just thoseOLDPATH's included in the binary package relocation hint(s).--excludepath OLDPATHโ Don't install files whose name begins withOLDPATH.--excludeartifactsโ Don't install any files which are marked as artifacts, such as build-id links.--excludeconfigs,--noconfigsโ Do not install configuration files.--excludedocsโ Don't install any files which are marked as documentation (which includes man pages and texinfo documents). yes this includes man pages, yes that's a little self-referential, yes it's funny ๐ญ--forceโ Same as using--replacepkgs,--replacefiles, and--oldpackage.--ignoresizeโ Don't check mount filesystems for sufficient disk space before installing this package. Living dangerously, fr fr.--ignorearchโ Allow installation or upgrading even if the architectures of the binary package and host don't match.--ignoreosโ Allow installation or upgrading even if the operating systems of the binary package and host don't match.--includedocsโ Install documentation files. This is the default behavior.--nocontextsโ Don't set SELinux contexts for files and scriptlets. Only effective ifrpm-plugin-selinux(8)is installed and active.--nocapsโ Don't set file capabilities.--noverifyโ Don't perform verify package files prior to installation.--nosysusersโ Don't createrpm-sysusers(7)from packages--oldpackageโ Allow an upgrade to replace a newer package with an older one. Downgrade era, we love a throwback โจ--prefix NEWPATHโ For relocatable binary packages, translate all file paths that start with the installation prefix in the package relocation hint(s) toNEWPATH.--relocate OLDPATH=NEWPATHโ For relocatable binary packages, translate all file paths that start withOLDPATHin the package relocation hint(s) toNEWPATH. This option can be used repeatedly if severalOLDPATH's in the package are to be relocated.--replacefilesโ Install the packages even if they replace files from other, already installed, packages.--replacepkgsโ Install the packages even if some of them are already installed on this system.
๐ ERASE OPTIONS ๐
--allmatchesโ Remove all versions of the package which matchPACKAGE_NAME. Normally an error is issued ifPACKAGE_NAMEmatches multiple packages. So like, normally she panics if you're ambiguous, but with this flag? She takes them all out. Dramatic ๐ซถ
๐ TRANSACTION OPTIONS ๐
The transaction options are common to --install, --upgrade, --reinstall and --erase operations. Shared queen behavior.
--deploopsโ Print dependency loops as warnings.-h,--hashโ Print 50 hash marks as the package archive is unpacked. Use with-v|--verbosefor a nicer display. 50 little#'s going by, so satisfying, lowkey hypnotic ๐--justdbโ Update only the database, not the filesystem.--nodbโ Update only the filesystem, not the database.--nodepsโ Don't check dependencies before uninstalling the packages.--noorderโ Don't reorder the packages for an install. The list of packages would normally be reordered to satisfy dependencies.--nopluginsโ Do not load and execute plugins.--noscriptsโ Disables execution of package scriptlets. Equivalent to
--nopre --nopost --nopreun --nopostun --nopretrans --noposttrans
--nopreuntrans --nopostuntrans
--nopre--nopost--nopreun--nopostun--nopretrans--noposttrans--nopreuntrans--nopostuntransโ Don't execute the scriptlets of the named type.--notriggersโ Disable execution of package triggers. Equivalent to
--notriggerprein --notriggerin --notriggerun --notriggerpostun
--notriggerin--notriggerun--notriggerprein--notriggerpostunโ Disable execution of the trigger scriptlets of the named type.--percentโ Print percentages as files are unpacked from the package archive. This is intended to make rpm easy to run from other tools.--testโ Don't really execute anything, just go through the motions. Useful in conjunction with the-vvoption for debugging. She's doing a little dress rehearsal, no real consequences ๐
๐ QUERY OPTIONS ๐
--qf QUERYFMT,--queryformat QUERYFMTโ Output format of each queried package, as described byrpm-queryformat(7). If omitted, uses the format defined by%_query_all_fmtinrpm-config(5).
There are three subsets of options for querying: package selection, file selection and information selection.
โจ PACKAGE SELECTION OPTIONS โจ
okay so these are the ones that decide which packages we're even talking about. choosing your faves, basically. ๐
-a,--all[SELECTOR ...] โ queries all the installed packages. and yes bestie, you can narrow it down with optionalSELECTORs in the formtag=pattern, likename="b*"to grab packages whose name starts withb. slay.--dupesโ lists duplicated packages. (yes. dupes. as in, more than one. we don't judge. ๐)-f,--fileFILE โ query which package owns the installed FILE.--filecapsโ lists filenames along with their POSIX1.e capabilities.--fileclassโ lists filenames with their classes (that's libmagic classification, iykyk).--filecolorโ lists filenames with their colors. the vibes are:0for noarch,1for 32bit,2for 64 bit. ๐จ--fileprovideโ lists filenames with their provides.--filerequireโ lists filenames with their requires.-g,--groupGROUP โ query packages that live in the group GROUP.--noglobโ don't glob arguments when installing package files. no wildcards, no chaos.--nomanifestโ don't process non-package files asrpm-manifest(5)files.-p,--packagePACKAGE_FILE โ query an (uninstalled!) package PACKAGE_FILE. it's giving window shopping. ๐๏ธ--pathPATH โ query the package(s) that own PATH, whether the file is installed or not. heads up: multiple packages can own a PATH, but the file is only owned by the package installed last. periodt.--querybynumberHDRNUM โ query the HDRNUM database entry directly. honestly only useful for debugging, ngl.--specfileSPECFILE โ obsolete. userpmspec(1)instead. it's retired, bestie, let it rest. ๐--tidTID โ query package(s) that have a given TID transaction identifier. fun fact: a UNIX timestamp is currently used as a transaction identifier, and every package installed or erased within a single transaction shares a common identifier. friend group behavior fr fr.--triggeredbyPACKAGE_NAME โ query packages that get triggered by package(s) PACKAGE_NAME.--whatobsoletesCAPABILITY โ query all packages that obsolete CAPABILITY for proper functioning.--whatprovidesCAPABILITY โ query all packages that provide the CAPABILITY capability.--whatrequiresCAPABILITY โ query all packages that require CAPABILITY for proper functioning.--whatconflictsCAPABILITY โ query all packages that conflict with CAPABILITY.--whatrecommendsCAPABILITY โ query all packages that recommend CAPABILITY.--whatsuggestsCAPABILITY โ query all packages that suggest CAPABILITY.--whatsupplementsCAPABILITY โ query all packages that supplement CAPABILITY.--whatenhancesCAPABILITY โ query all packages that enhance CAPABILITY.
๐ PACKAGE QUERY OPTIONS ๐
the "tell me everything about this package" girlies. ๐
--changelogโ displays change information for the package.--changesโ same energy, but with full timestamps. โจ--conflictsโ lists capabilities this package conflicts with. drama. ๐ธ--dumpโ dumps file information in exactly this order (and yes, it implies-l):
path size mtime digest mode owner group isconfig isdoc rdev symlink
--enhancesโ lists capabilities enhanced by package(s).--filesbypkgโ lists all the files in each selected package.--filetriggersโ lists filetrigger scriptlets from package(s).-i,--infoโ displays package information, including name, version, and description. and it uses the--queryformatif one was specified. ๐--lastโ orders the package listing by install time so the latest packages are at the top. freshest first, as they should be.-l,--listโ lists files in the package.--obsoletesโ lists packages this package obsoletes.--providesโ lists capabilities this package provides.--recommendsโ lists capabilities recommended by package(s).-R,--requiresโ lists capabilities on which this package depends.--suggestsโ lists capabilities suggested by package(s).--supplementsโ lists capabilities supplemented by package(s).--scriptsโ lists the package specific scriptlet(s) used as part of the installation and uninstallation processes.-s,--stateโ displays the states of files in the package (implies-l). each file's state is one ofnormal,not installed, orreplaced.--triggers,--triggerscriptsโ displays the trigger scripts, if any, contained in the package.--xmlโ formats package headers as XML.
๐ฆ FILE SELECTION OPTIONS ๐ฆ
picking and choosing which files get to come to the party.
-A,--artifactfilesโ only include artifact files (implies-l).-c,--configfilesโ only include configuration files (implies-l).-d,--docfilesโ only include documentation files (implies-l).-L,--licensefilesโ only include license files (implies-l).--noartifactโ excludes artifact files.--noconfigโ excludes config files.--noghostโ excludes ghost files. ๐ป (sorry, had to)
๐ VERIFY OPTIONS ๐
okay so the package and file selection options here are the same as for package querying โ including rpm-manifest(5) files as arguments, yes really. the options that are unique to verify mode are these:
--nodepsโ don't verify dependencies of packages.--nodigestโ don't verify package or header digests when reading.--nofilesโ don't verify any attributes of package files.--noscriptsโ don't execute the%verifyscriptscriptlet (if any).--nosignatureโ don't verify package or header signatures when reading.--nolinktoโ don't verify the corresponding file attribute.--nofiledigest(formerly--nomd5) โ don't verify the corresponding file attribute.--nosizeโ don't verify the corresponding file attribute.--nomtimeโ don't verify the corresponding file attribute.--nomodeโ don't verify the corresponding file attribute.--nordevโ don't verify the corresponding file attribute.--nouser,--nogroupโ don't verify file user/group ownership. โ ๏ธ note that only localpasswd(5)andgroup(5)databases are consulted. so no, your LDAP bestie isn't getting a vote here.--nocapsโ don't verify file capabilities.
๐ OUTPUT ๐
--verifyโ the format of the output is a string of 9 result characters, one possible attribute each from the package, followed by the filename.
each of those 9 characters denotes the result of comparing attribute(s) of the file to the value of those attribute(s) recorded in the database.
a single . (period) means the test passed. a single ? (question mark) means the test could not be performed (e.g. file permissions prevent reading). otherwise, the (mnemonically emBoldened) character denotes failure of the corresponding --verify test:
Sโ file Size differsMโ Mode differs (includes permissions and file type)5โ digest (formerly MD5 sum) differsDโ Device major/minor number mismatchLโ readLink(2) path mismatchUโ User ownership differsGโ Group ownership differsTโ mTime differsPโ caPabilities differ
and here's the attribute legend, the little letters that show up next to files:
aโ%artifactโ an implicit side-effect file (eg. build-id links)cโ%configurationfiledโ%documentationfilegโ%ghostfilelโ%licensefilemโ%missingokโ file missing is not a verify failurenโ%config(noreplace)โ do not replace (a%configfile)rโ%readmefilesโrpm-spec(5)file in a source package
โญ EXIT STATUS โญ
on success, 0 is returned. otherwise, a nonzero failure code. that's it, that's the whole vibe check. ๐ซถ
๐ฅ EXAMPLES ๐ฅ
vanillest of them all
rpm -Uvh hello-2.0-1.noarch.rpm
install or upgrade the hello-2.0-1.noarch.rpm package with verbose output and progress meters. and honestly? -Uvh is probably the most common of all the rpm operations. the main character. ๐
alternative root situation
rpm -Uvh --excludedocs --root /srv/test mydist-23.mft
installs the packages described by the mydist-23.mft rpm-manifest(5) file into the alternative system root at /srv/test, excluding all documentation files. bye docs, love you tho. ๐
freshen up
rpm -Fvh *.rpm
freshens installed packages from a local directory, with verbose output and progress meters.
kernel moment
rpm -i kernel-6.15.4-200.x86_64.rpm
installs the kernel-6.15.4-200.x86_64.rpm package quietly. on some Linux distributions, different kernel versions are intended to be installed in parallel like this, without erasing older ones, so there's always a bootable kernel in case of problems. it's one of the few cases where -i is the right thing to use. rare -i W.
erase 'em all
rpm -evh --allmatches libhello
erases all versions of the package libhello on the system, with verbose output and progress meters. typically there's only one version of a package installed at a time, but in some cases it's possible to have different versions or different architectures of a package installed in parallel โ in which case --allmatches can be handy. no cap.
the oopsie fixer
rpm -vh --reinstall hello-2.0-1.noarch.rpm
reinstalls a previously installed hello-2.0-1.noarch.rpm package, with verbose output and progress labels. useful if eg. the files of a package get corrupted or erased accidentally. we've all been there bestie. ๐ญ
restore the perms
rpm -v --restore --all
restores permissions of files in all installed packages to their packaged specifications, with verbose output.
verify but skip the configs
rpm --verify --noconfig openssh-server
verifies the integrity of the installed openssh-server package, ignoring changes in configuration. because yes, you edited it, and no, we don't care.
list it ALL
rpm -qa
lists all installed packages, using the default formatting.
ls vibes
rpm -qlv --noartifact glibc
lists the files of the glibc package in a style similar to the ls(1) command output with ls -l, omitting "artifact" files such as build-id's which are not usually the main interest.
filenames + digests
rpm -q --qf "[%{filenames} %{filedigests}\n]" openssh-server
lists filenames and their corresponding digests of the installed openssh-server package. ๐ง
peek before you install, PLEASE
rpm -qp --scripts --triggers --filetriggers myserver-1.0-1.x86_64.rpm
shows all scriptlets and triggers from the myserver-1.0-1.x86_64.rpm package file.
bestie. before installing unknown packages, at least do this! ๐ it's the bare minimum and it takes two seconds.
macro expansion
rpm --target ppc64le --eval "%optflags"
prints the expansion of the %optflags macro for the ppc64le architecture.
๐ธ FILES ๐ธ
see rpm-common(8), rpm-config(5) and rpm-rpmrc(5). they hold the deets. ๐
๐ SEE ALSO ๐
rpm-common(8), popt(3), rpm2cpio(1), rpmbuild(1), rpmdb(8), rpmkeys(8), rpmsign(1), rpmspec(1), rpm-queryformat(7) rpm-manifest(5) rpm-version(7) rpm-plugins(8)
rpm --help โ as rpm supports customizing the options via popt aliases, it's impossible to guarantee that what's described in the manual matches what's actually available. so likeโฆ read the manual, but also, you know. ๐
and that's a wrap on our lil RPM(8) hangout!! this whole thing is RPM 6.1.0, dated 2026-08-20 โ go forth and rpm responsibly bestie, ily, bye!! ๐
โจ๐ฆ๐
๐ฆ where this page comes from
- ubuntu stonking: rpm 6.1.0-1 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms