Debian Codegraph @

upstream/debian-unstable/man8/rpmdb.8

raw
1 .\" Generated by scdoc 1.11.4
2 .\" Complete documentation for this program is not available as a GNU info page
3 .ie \n(.g .ds Aq \(aq
4 .el .ds Aq '
5 .nh
6 .ad l
7 .\" Begin generated content:
8 .TH "RPMDB" "8" "2026-04-10" "RPM 6.0.1"
9 .PP
10 .SH NAME
11 rpmdb - RPM Database Tool
12 .PP
13 .SH SYNOPSIS
14 \fBrpmdb\fR [options] {\fB--initdb\fR|\fB--rebuilddb\fR}
15 .PP
16 \fBrpmdb\fR [options] {\fB--verifydb\fR}
17 .PP
18 \fBrpmdb\fR [options] {\fB--exportdb\fR|\fB--importdb\fR}
19 .PP
20 .SH DESCRIPTION
21 The \fBrpmdb\fR is used for \fBrpm\fR database maintenance operations.\&
22 .PP
23 .SH OPERATIONS
24 \fB--initdb\fR
25 .RS 4
26 Create a new database if one doesn'\&t already exist.\& An
27 existing database is not overwritten.\&
28 .PP
29 .RE
30 \fB--rebuilddb\fR
31 .RS 4
32 Rebuild database from the installed package headers.\&
33 Rebuilding discards any unreadable (corrupt) headers
34 from the database, but also compacts the database in
35 case it has grown large over time.\&
36 .PP
37 Can also be used to convert between different \fBrpmdb\fR
38 formats.\&
39 .PP
40 .RE
41 \fB--verifydb\fR
42 .RS 4
43 Perform a low-level integrity check on the database.\&
44 Rarely useful, for system health \fBrpm --verify -a\fR is a far more
45 meaningful operation.\&
46 .PP
47 .RE
48 \fB--exportdb\fR
49 .RS 4
50 Export the database in header-list format, suitable
51 for transporting to another host or database type.\&
52 The data is output to standard output.\&
53 .PP
54 .RE
55 \fB--importdb\fR
56 .RS 4
57 Imports a database from a header-list format as created
58 by \fB--exportdb\fR.\& The data is read from standard input.\&
59 .PP
60 .RE
61 .SH OPTIONS
62 See \fBrpm-common\fR(8) for the options common to all \fBrpm\fR executables.\&
63 .PP
64 .SH CONFIGURATION
65 There are several configurables affecting the rpmdb operations,
66 but in particular the following (see \fBrpm-config\fR(5) for details):
67 .PD 0
68 .IP \(bu 4
69 \fB%_dbpath\fR
70 .IP \(bu 4
71 \fB%_db_backend\fR
72 .PD
73 .PP
74 .SH EXIT STATUS
75 On success, 0 is returned, a nonzero failure code otherwise.\&
76 .PP
77 .SH EXAMPLES
78 \fBrpmdb --initdb --dbpath /tmp/testdb\fR
79 .RS 4
80 Initialize a new database in \fI/tmp/testdb\fR directory.\&
81 .PP
82 .RE
83 \fBrpmdb --rebuilddb\fR
84 .RS 4
85 Rebuild the system rpmdb.\&
86 .PP
87 .RE
88 \fBrpmdb --verifydb --root /mnt\fR
89 .RS 4
90 Verify the system database of a system image mounted
91 at \fI/mnt\fR.\&
92 .PP
93 .RE
94 \fBrpmdb --exportdb > /tmp/headers\fR
95 .RS 4
96 Export the system database to \fI/tmp/headers\fR file.\&
97 .PP
98 .RE
99 \fBrpmdb --importdb --define "_db_backend ndb" --dbpath /tmp/newdb < /tmp/headers\fR
100 .RS 4
101 Import contents of \fI/tmp/headers\fR header list to a (new)
102 \fBndb\fR-format database in \fI/tmp/newdb\fR.\&
103 .PP
104 .RE
105 .SH OPTIONS
106 See \fBrpm-common\fR(8) for the options common to all operations.\&
107 .PP
108 .SH SEE ALSO
109 \fBpopt\fR(3), \fBrpm\fR(8), \fBrpm-common\fR(8)
110 .PP
111 \fBrpmdb --help\fR - as \fBrpm\fR(8) supports customizing the options via popt
112 aliases it'\&s impossible to guarantee that what'\&s described in the
113 manual matches what'\&s available.\&
114 .PP
115 \fBhttp://www.\&rpm.\&org/\fR