In this post I am sharing, the troubleshooting step of the error which we found on using linux yum command.Error: database disk image is malformed, we found this problem running the command yum update
To resolve this issue run the below given command
yum clean dbcache
If still issue persist,run below given command
yum clean all
As per man page of yum :
yum clean dbcache
Eliminate the sqlite cache used for faster access to metadata. Using this option will force yum to download the sqlite metadata the next time it is run, or recreate the sqlite metadata if using an older repo
Given below is the reference from our system:
[root@localhost ~]# yum update Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.excellmedia.net * epel: epel.mirror.net.in * extras: centos.excellmedia.net * updates: centos.excellmedia.net Error: database disk image is malformed [root@localhost ~]# yum update Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.excellmedia.net * epel: epel.mirror.net.in * extras: centos.excellmedia.net * updates: centos.excellmedia.net Error: database disk image is malformed [root@localhost ~]# [root@localhost ~]# yum update Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.excellmedia.net * epel: epel.mirror.net.in * extras: centos.excellmedia.net * updates: centos.excellmedia.net Error: database disk image is malformed [root@localhost ~]# yum clean dbcache Loaded plugins: fastestmirror Cleaning repos: base epel extras updates 5 sqlite files removed [root@localhost ~]# [root@localhost ~]# yum update Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.excellmedia.net * epel: epel.mirror.net.in * extras: centos.excellmedia.net * updates: centos.excellmedia.net base/primary_db | 3.5 MB 00:00 epel/primary_db | 4.8 MB 00:01 extras/primary_db | 18 kB 00:00 updates/primary_db | 1.3 MB 00:00 Setting up Update Process Resolving Dependencies --> Running transaction check ---> Package ca-certificates.noarch 0:2013.1.94-65.0.el6 will be updated ---> Package ca-certificates.noarch 0:2013.1.95-65.1.el6_5 will be an update ---> Package ethtool.i686 2:3.5-1.el6 will be updated ---> Package ethtool.i686 2:3.5-1.2.el6_5 will be an update ---> Package kernel.i686 0:2.6.32-431.3.1.el6 will be installed ---> Package kernel-firmware.noarch 0:2.6.32-431.1.2.0.1.el6 will be updated ---> Package kernel-firmware.noarch 0:2.6.32-431.3.1.el6 will be an update ---> Package nss.i686 0:3.15.3-2.el6_5 will be updated ---> Package nss.i686 0:3.15.3-3.el6_5 will be an update ---> Package nss-sysinit.i686 0:3.15.3-2.el6_5 will be updated ---> Package nss-sysinit.i686 0:3.15.3-3.el6_5 will be an update ---> Package nss-tools.i686 0:3.15.3-2.el6_5 will be updated ---> Package nss-tools.i686 0:3.15.3-3.el6_5 will be an update ---> Package openssl.i686 0:1.0.1e-16.el6_5 will be updated ---> Package openssl.i686 0:1.0.1e-16.el6_5.4 will be an update ---> Package tzdata.noarch 0:2013g-1.el6 will be updated ---> Package tzdata.noarch 0:2013i-1.el6 will be an update ---> Package yum.noarch 0:3.2.29-40.el6.centos will be updated ---> Package yum.noarch 0:3.2.29-43.el6.centos will be an update --> Finished Dependency Resolution Dependencies Resolved =============================================================================================================================================================== Package Arch Version Repository Size =============================================================================================================================================================== Installing: kernel i686 2.6.32-431.3.1.el6 updates 26 M Updating: ca-certificates noarch 2013.1.95-65.1.el6_5 updates 1.1 M ethtool i686 2:3.5-1.2.el6_5 updates 97 k kernel-firmware noarch 2.6.32-431.3.1.el6 updates 13 M nss i686 3.15.3-3.el6_5 updates 825 k nss-sysinit i686 3.15.3-3.el6_5 updates 40 k nss-tools i686 3.15.3-3.el6_5 updates 367 k openssl i686 1.0.1e-16.el6_5.4 updates 1.5 M tzdata noarch 2013i-1.el6 updates 447 k yum noarch 3.2.29-43.el6.centos updates 996 k Transaction Summary =============================================================================================================================================================== Install 1 Package(s) Upgrade 9 Package(s) Total download size: 44 M Is this ok [y/N]: y