The rpmdb is used for rpm database maintenance operations.
OPERATIONS
--initdb
Create a new database if one doesn't already exist. An existing database is not overwritten.
--rebuilddb
Rebuild database from the installed package headers. Rebuilding discards any unreadable (corrupt) headers from the database, but also compacts the database in case it has grown large over time.
Can also be used to convert between different rpmdb formats.
--verifydb
Perform a low-level integrity check on the database. Rarely useful, for system health rpm --verify -a is a far more meaningful operation.
--exportdb
Export the database in header-list format, suitable for transporting to another host or database type. The data is output to standard output.
--importdb
Imports a database from a header-list format as created by --exportdb. The data is read from standard input.
OPTIONS
See rpm-common(8) for the options common to all rpm executables.
CONFIGURATION
There are several configurables affecting the rpmdb operations, but in particular the following (see rpm-config(5) for details):
•
%_dbpath
•
%_db_backend
EXIT STATUS
On success, 0 is returned, a nonzero failure code otherwise.
EXAMPLES
rpmdb --initdb --dbpath /tmp/testdb
Initialize a new database in /tmp/testdb directory.
rpmdb --rebuilddb
Rebuild the system rpmdb.
rpmdb --verifydb --root /mnt
Verify the system database of a system image mounted at /mnt.
rpmdb --help - as rpm(8) supports customizing the options via popt aliases it's impossible to guarantee that what's described in the manual matches what's available.
http://www.rpm.org/
History
Arch Linux 2026-11-01: the text shown here
Debian 13 (Trixie)
Debian 12 (Bookworm)
Debian 11 (Bullseye) to Debian 8 (Jessie)
Debian 7 (Wheezy)
Debian 6.0 (Squeeze)
Debian 5.0 (Lenny)
Debian 4.0 (Etch)
Debian 3.1 (Sarge) to Debian 3.0 (Woody)
--aid until Debian 6.0 (Squeeze);
--all until Debian 7 (Wheezy);
--allfiles until Debian 7 (Wheezy);
--allmatches until Debian 7 (Wheezy);
--badreloc until Debian 7 (Wheezy);
--buildroot until Debian 3.1 (Sarge);
--changelog until Debian 7 (Wheezy);
--clean until Debian 3.1 (Sarge);
--configfiles until Debian 7 (Wheezy);
--conflicts until Debian 7 (Wheezy);
--dbpath until Debian 7 (Wheezy);
--docfiles until Debian 7 (Wheezy);
--dump until Debian 7 (Wheezy);
--eval until Debian 7 (Wheezy);
--excludedocs until Debian 7 (Wheezy);
--excludepath until Debian 7 (Wheezy);
--file until Debian 7 (Wheezy);
--fileid until Debian 6.0 (Squeeze);
--filesbypkg until Debian 7 (Wheezy);
--force until Debian 7 (Wheezy);
--ftpport until Debian 7 (Wheezy);
--ftpproxy until Debian 7 (Wheezy);
--group until Debian 7 (Wheezy);
--hash until Debian 7 (Wheezy);
--hdrid until Debian 7 (Wheezy);
--help until Debian 7 (Wheezy);
--httpport until Debian 7 (Wheezy);
--httpproxy until Debian 7 (Wheezy);
--ignorearch until Debian 7 (Wheezy);
--ignoreos until Debian 7 (Wheezy);
--ignoresize until Debian 7 (Wheezy);
--includedocs until Debian 7 (Wheezy);
--info until Debian 7 (Wheezy);
--justdb until Debian 7 (Wheezy);
--last until Debian 7 (Wheezy);
--list until Debian 7 (Wheezy);
--nobuild until Debian 3.1 (Sarge);
--nodeps until Debian 7 (Wheezy);
--nodigest until Debian 7 (Wheezy);
--nofiles until Debian 7 (Wheezy);
--nogroup until Debian 7 (Wheezy);
--nolinkto until Debian 7 (Wheezy);
--nomanifest until Debian 7 (Wheezy);
--nomd5 until Debian 5.0 (Lenny);
--nomode until Debian 7 (Wheezy);
--nomtime until Debian 7 (Wheezy);
--noorder until Debian 7 (Wheezy);
--nopost until Debian 7 (Wheezy);
--nopostun until Debian 7 (Wheezy);
--nopre until Debian 7 (Wheezy);
--nopreun until Debian 7 (Wheezy);
--nordev until Debian 7 (Wheezy);
--noscripts until Debian 7 (Wheezy);
--nosignature until Debian 7 (Wheezy);
--nosize until Debian 7 (Wheezy);
--nosuggest until Debian 6.0 (Squeeze);
--notriggerin until Debian 7 (Wheezy);
--notriggerpostun until Debian 7 (Wheezy);
--notriggerprein until Debian 7 (Wheezy);
--notriggers until Debian 7 (Wheezy);
--notriggerun until Debian 7 (Wheezy);
--nouser until Debian 7 (Wheezy);
--obsoletes until Debian 7 (Wheezy);
--oldpackage until Debian 7 (Wheezy);
--package until Debian 7 (Wheezy);
--percent until Debian 7 (Wheezy);
--pipe until Debian 7 (Wheezy);
--pkgid until Debian 7 (Wheezy);
--prefix until Debian 7 (Wheezy);
--provides until Debian 7 (Wheezy);
--querybynumber until Debian 7 (Wheezy);
--quiet until Debian 7 (Wheezy);
--rcfile until Debian 7 (Wheezy);
--relocate until Debian 7 (Wheezy);
--repackage until Debian 5.0 (Lenny);
--replacefiles until Debian 7 (Wheezy);
--replacepkgs until Debian 7 (Wheezy);
--requires until Debian 7 (Wheezy);
--rmsource until Debian 3.1 (Sarge);
--rmspec until Debian 3.1 (Sarge);
--root until Debian 7 (Wheezy);
--scripts until Debian 7 (Wheezy);
--short-circuit until Debian 3.1 (Sarge);
--sign until Debian 3.1 (Sarge);
--specfile until Debian 7 (Wheezy);
--state until Debian 7 (Wheezy);
--target until Debian 3.1 (Sarge);
--test until Debian 7 (Wheezy);
--tid until Debian 7 (Wheezy);
--triggeredby until Debian 7 (Wheezy);
--triggers until Debian 7 (Wheezy);
--triggerscripts until Debian 7 (Wheezy);
--version until Debian 7 (Wheezy);
--whatprovides until Debian 7 (Wheezy);
--whatrequires until Debian 7 (Wheezy);
-? until Debian 7 (Wheezy);
-E until Debian 7 (Wheezy);
-R until Debian 7 (Wheezy);
-a until Debian 7 (Wheezy);
-ba until Debian 3.1 (Sarge);
-bb until Debian 3.1 (Sarge);
-bc until Debian 3.1 (Sarge);
-bi until Debian 3.1 (Sarge);
-bl until Debian 3.1 (Sarge);
-bp until Debian 3.1 (Sarge);
-bs until Debian 3.1 (Sarge);
-c until Debian 7 (Wheezy);
-d until Debian 7 (Wheezy);
-f until Debian 7 (Wheezy);
-g until Debian 7 (Wheezy);
-h until Debian 7 (Wheezy);
-i until Debian 7 (Wheezy);
-l until Debian 7 (Wheezy);
-p until Debian 7 (Wheezy);
-s until Debian 7 (Wheezy);
-v until Debian 7 (Wheezy);
-vv until Debian 7 (Wheezy).