What's the best way to really clean /var/cache/yum?
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 10 of 10
  1. #1
    Join Date
    Sep 2009
    Posts
    2,209
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What's the best way to really clean /var/cache/yum?

    Is this normal after executing "sudo yum clean all?"
    Code:
    $ du -hs /var/cache/yum/*/*
    143M	/var/cache/yum/x86_64/12
    269M	/var/cache/yum/x86_64/13
    379M	/var/cache/yum/x86_64/14
    Most of the space seems to be taken up by a bunch of *.sqlite files, but there are seven old *.rpm files as well. Is it safe to delete the old *.rpm files? What's up with all those big *.sqlite files?

    Thanks,
    dd_wizard

  2. #2
    Join Date
    Sep 2006
    Location
    Connellsville, PA, USA
    Posts
    11,308
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: What's the best way to really clean /var/cache/yum?

    'yum clean all' does not clean up disabled repos. Enable any repo recently used but now disabled, then try 'yum clean all' again. Don't forget to disable those repo(s) again.

    Newer versions of YUM retain far more data than older versions, no matter what you do.

    HTH,
    V

  3. #3
    Join Date
    Jul 2005
    Location
    RainCity
    Posts
    1,888
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: What's the best way to really clean /var/cache/yum?

    I didn't know that, thanks Hinlgler, maybe doing yum --enablerepo=* clean all would do it?
    Kurt Driver
    Vancouver, Canada

    https://www.wikitree.com/wiki/Driver-1479

  4. #4
    Join Date
    Sep 2006
    Location
    Connellsville, PA, USA
    Posts
    11,308
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: What's the best way to really clean /var/cache/yum?

    Yes, but if you use '--enablerepo=*', be prepared for a possibly loooong wait, especially of any repo is down/unavailable: YUM seems to check for repo availability before it cleans it's database.

    V

    EDIT: In other words: YUM will first fetch metadata for any repos which it has none, then promptly clean all. Stupid YUM...

  5. #5
    Join Date
    Sep 2009
    Posts
    2,209
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: What's the best way to really clean /var/cache/yum?

    Hmm, I looked around in the subdirectories, and I'll need to enable all the repos for F12 and F13 as well as those for F14. Does that work?

    Thanks,
    dd_wizard

  6. #6
    Join Date
    Sep 2006
    Location
    Connellsville, PA, USA
    Posts
    11,308
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: What's the best way to really clean /var/cache/yum?

    I would not do that. In this case, I'd manually erase them (F12/13). What use are they anyway?

    V

  7. #7
    Join Date
    Sep 2009
    Posts
    2,209
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: What's the best way to really clean /var/cache/yum?

    Ah, that was actually my first thought. Judicious use of rm -fr would be a lot faster, but will that confuse yum for the F14 directory?

    Thanks again,
    dd_wizard

  8. #8
    Join Date
    Sep 2006
    Location
    Connellsville, PA, USA
    Posts
    11,308
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: What's the best way to really clean /var/cache/yum?

    YUM should not be "confused" because you delete obsolete cache stuff. But in all honesty: I don't know for sure. YUM is fairly stupid.

    I would not worry. Just manually purge the cruft.

    V

  9. #9
    Join Date
    Sep 2009
    Posts
    2,209
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: What's the best way to really clean /var/cache/yum?

    Thanks Hlingler, all gone! Hopefully I didn't break anything.

    dd_wizard

  10. #10
    Join Date
    Jul 2008
    Posts
    1,348
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: What's the best way to really clean /var/cache/yum?

    I semi-regularly just wipe out /var/cache/yum with 'rm -rf'.
    It does no harm as yum will re-create and re-download metadata as needed.
    Obviously though, if you have yum set to cache downloaded rpm's for whatever
    reason and wish to keep them, that won't work for you.

Similar Threads

  1. abrt clean cache ??
    By oxala in forum Using Fedora
    Replies: 1
    Last Post: 25th September 2010, 09:25 PM
  2. clean ABRT cache, is it safe?
    By Catastrophe in forum Using Fedora
    Replies: 2
    Last Post: 9th December 2009, 07:04 PM
  3. no cache in /var/cache/yum for fedora 5
    By fire-fly in forum Installation, Upgrades and Live Media
    Replies: 4
    Last Post: 26th April 2006, 07:32 PM
  4. yum CLEAN fails to clean my house
    By blochbob in forum Using Fedora
    Replies: 9
    Last Post: 4th October 2004, 02:12 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •