Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

rpm rebuild db

On rare occasions, rpm locks up. The issue is probably a broken database, so try cleaning it and rebuilding it. Remove the rpm db files Rebuild the database.

rm -f /var/lib/rpm/__db*
rpm --rebuilddb

Additionally, you can clean up the .lock files, after confirming no yum or rpm processes are running.

rm -f /var/lib/rpm/.*.lock

So many Internet references discuss rebuilding the rpm database, so so specific sources are provided.

Comments