• 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
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

Recent Posts

  • How To Get SMETS1/2 Smart Meter Data into HomeAssistant the Easy Way
  • How to Install 7zip on Ubuntu 18.04 LTS (Bionic Beaver)
  • How to Install the NewRelic MySQL Plugin
  • Repair “Repository Error: database disk image is malformed” YUM Issue
  • How to Check NTP Connectivity and Function on the Command Line

Recent Comments

  • himanshu on How to Test Memcached Connectivity
  • moun on How to Perform a GET Request with CURL via the Command Line
  • Karl on How to Install rar/unrar on Ubuntu 18.04 LTS (Bionic Beaver)
  • John on How to Install rar/unrar on Ubuntu 18.04 LTS (Bionic Beaver)
  • How to Install rar/unrar on Ubuntu 16.04 LTS (Xenial) - KJBweb on How to Install rar/unrar on Ubuntu 18.04 LTS (Bionic Beaver)

Archives

  • November 2022
  • February 2019
  • August 2018
  • November 2016

Categories

  • Examples
  • Hardware
  • How-to
  • Quick Fixes

Copyright © 2023 · WordPress · Log in