Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Running yum search something I get:

Error: database disk image is malformed

How to fix?

share|improve this question
Did you have any prior problems with the database? Did you recently upgrade rpm or yum? Is your RAM or hard disk failing (disk: check the kernel logs; RAM: you'll generally experience other data corruption and crashes)? Did your machine or the utility recently crash in the middle of an rpm or yum operation? Is the disk full or has it been full recently? – Gilles Dec 10 '10 at 21:14
@Gilles Probably because I kept on killing yum when it was doing it's package metadata downloads. Also, I'm running this on a VM, so maybe yum got confused with the messed-up dates. – Tshepang Dec 11 '10 at 8:37
up vote 6 down vote accepted

Just try:

su -c'yum clean all'

and enter your root pw.

share|improve this answer
man, thanks a lot! it really helped me. – user8281 Jun 11 '11 at 14:01
Als, you can use yum clean dbcache. – wener Oct 20 '14 at 6:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.