.\" Generated by scdoc 1.11.5 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "RPMDB" "8" "2026\-08\-31" "RPM 6.1.0" .PP .SH NAME rpmdb \- RPM Database Tool .PP .SH SYNOPSIS \fBrpmdb\fR [options] {\fB\-\-initdb\fR|\fB\-\-rebuilddb\fR} .PP \fBrpmdb\fR [options] {\fB\-\-verifydb\fR} .PP \fBrpmdb\fR [options] {\fB\-\-exportdb\fR|\fB\-\-importdb\fR} .PP .SH DESCRIPTION The \fBrpmdb\fR is used for \fBrpm\fR database maintenance operations.\& .PP .SH OPERATIONS \fB\-\-initdb\fR .RS 4 Create a new database if one doesn'\&t already exist.\& An existing database is not overwritten.\& .PP .RE \fB\-\-rebuilddb\fR .RS 4 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.\& .PP Can also be used to convert between different \fBrpmdb\fR formats.\& .PP .RE \fB\-\-verifydb\fR .RS 4 Perform a low\-level integrity check on the database.\& Rarely useful, for system health \fBrpm \-\-verify \-a\fR is a far more meaningful operation.\& .PP .RE \fB\-\-exportdb\fR .RS 4 Export the database in header\-list format, suitable for transporting to another host or database type.\& The data is output to standard output.\& .PP .RE \fB\-\-importdb\fR .RS 4 Imports a database from a header\-list format as created by \fB\-\-exportdb\fR.\& The data is read from standard input.\& .PP .RE .SH OPTIONS See \fBrpm\-common\fR(8) for the options common to all \fBrpm\fR executables.\& .PP .SH CONFIGURATION There are several configurables affecting the rpmdb operations, but in particular the following (see \fBrpm\-config\fR(5) for details): .PD 0 .IP \(bu 4 \fB%_dbpath\fR .IP \(bu 4 \fB%_db_backend\fR .PD .PP .SH EXIT STATUS On success, 0 is returned, a nonzero failure code otherwise.\& .PP .SH EXAMPLES \fBrpmdb \-\-initdb \-\-dbpath /tmp/testdb\fR .RS 4 Initialize a new database in \fI/tmp/testdb\fR directory.\& .PP .RE \fBrpmdb \-\-rebuilddb\fR .RS 4 Rebuild the system rpmdb.\& .PP .RE \fBrpmdb \-\-verifydb \-\-root /mnt\fR .RS 4 Verify the system database of a system image mounted at \fI/mnt\fR.\& .PP .RE \fBrpmdb \-\-exportdb > /tmp/headers\fR .RS 4 Export the system database to \fI/tmp/headers\fR file.\& .PP .RE \fBrpmdb \-\-importdb \-\-define "_db_backend ndb" \-\-dbpath /tmp/newdb < /tmp/headers\fR .RS 4 Import contents of \fI/tmp/headers\fR header list to a (new) \fBndb\fR\-format database in \fI/tmp/newdb\fR.\& .PP .RE .SH OPTIONS See \fBrpm\-common\fR(8) for the options common to all operations.\& .PP .SH SEE ALSO \fBpopt\fR(3), \fBrpm\fR(8), \fBrpm\-common\fR(8) .PP \fBrpmdb \-\-help\fR \- as \fBrpm\fR(8) supports customizing the options via popt aliases it'\&s impossible to guarantee that what'\&s described in the manual matches what'\&s available.\& .PP \fBhttp://www.\&rpm.\&org/\fR