• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar

KJBweb

Technical Notes & How To's

  • Home
  • How-to
  • Quick Fixes
  • Examples
  • Hardware
  • Privacy
You are here: Home / Quick Fixes / Repair “Repository Error: database disk image is malformed” YUM Issue

Repair “Repository Error: database disk image is malformed” YUM Issue

August 4, 2018Leave a Comment

This YUM database issue troubled me a fair few times in the past, so I kept the following fix on-hand to resolve it in a pinch.

The root cause of the corruption turned out to be something modifying the YUM database outside of YUM itself and making a hash of it (a badly written Nagios plugin), still, your mileage may vary but it’s something to think about.

To repair this issue and get YUM working again, run the following:

rm -fv /var/lib/rpm/__db*
rpm --rebuilddb
yum clean all

Now you can install, update, upgrade, and remove as normal.

The corruption may be a one-off, though if it keeps happening then take a closer look to resolve it for good.

Filed Under: Quick Fixes Tagged With: yum

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Copyright © 2025 · WordPress · Log in