clear yum cache

Christofer C. Bell christofer.c.bell at
Sat Dec 3 17:33:05 UTC 2005

On 12/3/05, yordy <ymedians at> wrote:
> Hi list...
> I want to free up space in my computer clearing yum
> cache for olders packages, I don't want to use yum
> clean headers or yum clean packages because I don't
> want to download any package update again. In my cache
> I have, the same package but with different version,
> how I can clean for older versions?

You really should use yum clean packages.  It won't make you download
anything again.  From the man page for yum(8):

       The following are the ways which you can invoke yum in clean mode.

       yum clean packages
              Eliminate any cached packages from the system.  Note that  pack-
              ages are not automatically deleted after they are downloaded.

This means that it deletes the packages it's downloaded and installed
on your machine.  It's a cache of what's been downloaded.  It won't
download them again as they're already installed.  Only newer versions
will be downloaded.

Using yum clean headers will, however, force you to download all the
header files again so if you're looking to avoid downloading things
again, then avoid yum clean headers.

As for a direct answer to your question about deleting only older
packages from /var/cache/yum/*, you'll need to take care of that by


"`The enemy we fight has no respect for human life or human rights.
They don't deserve our sympathy,' he said. `But this isn't about who
they are. This is about who we are. These are the values that
distinguish us from our enemies.' - Sen. John McCain, R-Arizona

More information about the fedora-list mailing list