RPMDB(8)

πŸ’– RPMDB(8) β€” the RPM Database Tool πŸ’–

okay bestie, welcome to rpmdb(8), straight out of the System Manager's Manual ✨ this is the little tool that takes care of your RPM database's whole self-care routine β€” think of it as the spa day for your package headers πŸ§–β™€οΈ


🌸 NAME 🌸

rpmdb β€” the RPM Database Tool πŸ‘‘


✨ SYNOPSIS ✨

rpmdb [options] {--initdb|--rebuilddb}

rpmdb [options] {--verifydb}

rpmdb [options] {--exportdb|--importdb}

like… pick your lane, bestie. two of these, or one, or two. that's the whole vibe chart πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

the rpmdb is used for rpm database maintenance operations. that's it. that's the job. it's giving janitor but make it couture 🧹✨


πŸ‘‘ OPERATIONS πŸ‘‘

  • --initdb β€” creates a brand-new database if one doesn't already exist. and if one does exist? nope, it does not get overwritten. she's respectful like that πŸ™ˆ an existing db stays untouched, periodt.
  • --rebuilddb β€” rebuilds the database from the installed package headers. rebuilding discards any unreadable (corrupt) headers from the database, but it also compacts the database in case it has grown large over time 🫢 so it's a glow-up AND a declutter. no cap.

she can also be used to convert between different rpmdb formats 🌈 format-shifting icon.

  • --verifydb β€” performs a low-level integrity check on the database. rarely useful β€” for actual system health, rpm --verify -a is a far more meaningful operation. so like, she's cute but she's not the main character here πŸ’€
  • --exportdb β€” exports 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 🫑 that's where the shared wardrobe lives.


πŸŽ€ 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 😭 (as she should).


🌈 EXAMPLES 🌈

like, here's how the girlies actually run it:

  • rpmdb --initdb --dbpath /tmp/testdb β€” initialize a new database in the /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 --exportdb > /tmp/headers β€” export the system database to the /tmp/headers file.
  • rpmdb --importdb --define "_db_backend ndb" --dbpath /tmp/newdb < /tmp/headers β€” import the contents of the /tmp/headers header list to a (new) ndb-format database in /tmp/newdb.

raw and exact, bestie:

rpmdb --initdb --dbpath /tmp/testdb

rpmdb --rebuilddb

rpmdb --verifydb --root /mnt

rpmdb --exportdb > /tmp/headers

rpmdb --importdb --define "_db_backend ndb" --dbpath /tmp/newdb <
/tmp/headers

πŸ’… OPTIONS πŸ’…

see rpm-common(8) for the options common to all operations. yes, again. she said what she said πŸ€·β™€οΈ


πŸ”₯ SEE ALSO πŸ”₯

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. so like… run --help and trust your own eyes, fr fr πŸ‘€ http://www.rpm.org/ 🌐

and that's the whole page, bestie!! this one's from RPM 6.1.0, dated 2026-08-20, in the System Manager's Manual section β€” mwah, iconic, go maintain your database responsibly πŸ«ΆπŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from