• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Linux

How to Fix Yum Error: Database Disk Image is Malformed

How VPS by How VPS
November 2, 2018
in Linux, Operating System
0
0
SHARES
70
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Brief Understanding of YumDB
  2. Fix Yum Error: database disk image is malformed

In this article, we will briefly describe YUM, YumDB, then the cause of Yum Error: database disk image is malformed and how to fix this error.

YUM (Yellowdog Updater, Modified) is the default, high-level tool for Linux package management on RPM (RedHat Package Manager) based Linux distributions such as Red Hat Enterprise Linux (RHEL), CentOS as well as older versions of Fedora Linux, just to mention but a few.

It works just like apt-get command or the relatively new apt command; it can be used to install new packages, remove old packages and query installed and/or available packages. It can also be used to update a system (together with dependency resolution and obsolete processing depending on stored repository metadata).

Note: This guide will assume you are controlling your system as root, otherwise use the sudo command to run all the commands below. Interestingly, you can also run sudo command without entering a password; did you know that, okay, let’s continue.

Brief Understanding of YumDB

Starting from version 3.2.26, yum stores supplementary information concerning installed packages in a location outside of the generic rpmdatabase; in a simple flat file database called yumdb (/var/lib/yum/yumdb/) – not a real database.

# cd /var/lib/yum/yumdb
# ls 
How to Fix Yum Error: Database Disk Image is Malformed

View Yum Database

You can check out one of the sub-directories to find out more about yumdb as follows.

# cd b
# ls
How to Fix Yum Error: Database Disk Image is Malformed

Check Yum Package Information

Although this information is not of great significance to yum processes, it is very useful to the system administrators: it clearly describes the context in which a package was installed on the system.

If you tried looking through the files (from_repo, installed_by, releasever etc..) shown in the screen shot above, you would probably see nothing important in them.

To access the information in them, you must install yum-utils which provides a script called yumdb – then use this script as explained below.

# yum install yum-utils 

The following command will get the repo from which httpd was installed.

# yumdb get from_repo httpd
How to Fix Yum Error: Database Disk Image is Malformed

Check Package Installed Repo

To define a note on the packages httpd and mariadb, type.

# yumdb set note "installed by aaronkilik to setup LAMP" httpd mariadb
How to Fix Yum Error: Database Disk Image is Malformed

Set Note on Installed Packages

And to vew all yumdb values concerning httpd and mariadb, type.

# yumdb info httpd mariadb
How to Fix Yum Error: Database Disk Image is Malformed

Find Information of Installed Packages

Fix Yum Error: database disk image is malformed

Occasionally while installing a package or updating your system using YUM, you may encounter the error: “database disk image is malformed”. It may result from a corrupted yumdb: possibly caused by an impediment of the “yum update” process or package installation.

To fix this error, you need to clean database cache by running the command below.

# yum clean dbcache 
How to Fix Yum Error: Database Disk Image is Malformed

Yum Clean Database Cache

If the above command fails to work (fix the error), try running the series of commands below.

# yum clean all			#delete entries in /var/cache/yum/ directory.
# yum clean metadata		#clear XML metadeta		
# yum clean dbcache		#clear the cached files for database
# yum makecache		        #make cache
How to Fix Yum Error: Database Disk Image is Malformed

Clear All Yum DB Cache and Metadata

Finally, you must rebuild your system’s RPM database for it to work.

# mv /var/lib/rpm/__db* /tmp
# rpm --rebuilddb
How to Fix Yum Error: Database Disk Image is Malformed

Rebuild RPM Database

If you have followed the above instructions well, then the error should be resolved by now. Then try to update your system as follows.

# yum update 

You may also check out these important articles concerning yum and other Linux package managers:

  1. How to Use ‘Yum History’ to Find Out Installed or Removed Packages Info
  2. 27 ‘DNF’ (Fork of Yum) Commands for RPM Package Management in Linux
  3. What is APT and Aptitude? and What’s real Difference Between Them?
  4. How to Use ‘apt-fast’ to Speed Up apt-get/apt Package Downloads Using Multiple Mirrors

Do you have any queries or ideas to share concerning this topic, use the comment section below to do that.

Source: tecmint.com

Tags: Linux Commandslinux guidelinux vps setup guide
Previous Post

Use ‘pushd’ and ‘popd’ for Efficient Filesystem Navigation in Linux

Next Post

11 Ways to Find User Account Info and Login Details in Linux

Next Post

11 Ways to Find User Account Info and Login Details in Linux

Leave a Reply Cancel reply

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

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet