KJBweb

Technical Notes & How To's
Menu
  • Blog
  • How-To
Home
How-To
Repair “Repository Error: database disk image is malformed” YUM Issue

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

Karl August 4, 2018

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.

Share
Tweet
Email
Prev Article
Next Article
Tags:yum

About The Author

Karl

Leave a Reply

Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • 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
  • How to Perform a GET Request with CURL via the Command Line

Recent Comments

  • 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)
  • FC on How to Install rar/unrar on Ubuntu 16.04 LTS (Xenial)

Archives

  • February 2019
  • August 2018
  • November 2016

Categories

  • Blog
  • How-To

KJBweb

Technical Notes & How To's
Copyright © 2021 KJBweb
Hello Huginn