FedoraForum.org - Fedora Support Forums and Community
Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2005
    Location
    Washington (the state), USA
    Age
    73
    Posts
    376
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Why is yum cache so big even after yum clean all?

    I have a small older HP OB6000 laptop with F14 on it and only 10GB of disk.

    I've been weeding out a lot of packages I don't need on it to carve more user disk space.

    One of the biggest disk consumers is /var/cache/yum. My problem is that even after a yum clean all it still consumes over 450MB.
    Code:
    [root@walden5 yum]# du -sb /var/cache/yum
    540108965	/var/cache/yum
    [root@walden5 yum]# yum clean all
    Loaded plugins: refresh-packagekit, remove-with-leaves
    Cleaning repos: adobe-linux-i386 fedora livna rpmfusion-free rpmfusion-free-updates rpmfusion-nonfree rpmfusion-nonfree-updates
                  : updates
    Cleaning up Everything
    [root@walden5 yum]# du -sb /var/cache/yum
    464078052	/var/cache/yum
    There appears to be a lot of older files in cache/yum. However I am concerned about just deleting them without some feedback from this forum.

    After a yum clean all, should cache/yum be empty?

  2. #2
    Join Date
    May 2011
    Location
    Louisiana
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Why is yum cache so big even after yum clean all?

    try to use the --releasever= option. It will clean previously releases, when specified>

    # yum clean all --releasever=13

  3. #3
    Join Date
    Aug 2005
    Location
    Washington (the state), USA
    Age
    73
    Posts
    376
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Why is yum cache so big even after yum clean all?

    No that did not help at all.
    Code:
    [root@walden5 ~]# du -sb /var/cache/yum
    540142108	/var/cache/yum
    [root@walden5 ~]# yum clean all --releasever=13
    Loaded plugins: refresh-packagekit, remove-with-leaves
    Cleaning repos: fedora livna rpmfusion-free rpmfusion-free-updates
                  : rpmfusion-nonfree rpmfusion-nonfree-updates updates
    Cleaning up Everything
    [root@walden5 ~]# du -sb /var/cache/yum
    540203548	/var/cache/yum
    This thing has been upgraded several times from as far back as F8. I suspect there is just a lot of old baggage left. I do not have the knowledge to know what is needed or not. I tried checking access times, but there are known repos out there that have rare updates (e.g. adobe).

    Can I just rm -rf * everything in the yum/cache? Will yum not just re-cache everything it needs? Or is there some critical state information being stored in the cache?

  4. #4
    Join Date
    Jun 2004
    Location
    Maryland, US
    Posts
    15,280
    Mentioned
    186 Post(s)
    Tagged
    0 Thread(s)

    Re: Why is yum cache so big even after yum clean all?

    You could just move it out of the way, then do a new yum check-update:
    mv /var/cache/yum /var/cache/yum.old
    mkdir /var/cache/yum
    yum check-update
    and see what happens. If something bad occurs just delete /var/cache/yum and move the old copy back
    to the original name.
    rm -fr /var/cache/yum
    mv /var/cache/yum.old /var/cache/yum
    I don't think there'd be a problem.

  5. #5
    Join Date
    May 2011
    Location
    Louisiana
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Why is yum cache so big even after yum clean all?

    If you want to know which versions of Fedora have cache in the repository, then go deeper:

    $ du -s /var/cache/yum/x86_64/*
    509460 /var/cache/yum/x86_64/14

    If you see that you have repo cache for other versions, then run clean all for the versions that have cache:

    # yum clean all --releasever=8
    # yum clean all --releasever=9
    # yum clean all --releasever=10
    # yum clean all --releasever=11
    # yum clean all --releasever=12
    # yum clean all --releasever=13
    # yum clean all --releasever=14

  6. #6
    Join Date
    Aug 2005
    Location
    Washington (the state), USA
    Age
    73
    Posts
    376
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Why is yum cache so big even after yum clean all?

    Quote Originally Posted by pmdyer
    If you want to know which versions of Fedora have cache in the repository, then go deeper:

    $ du -s /var/cache/yum/x86_64/*
    509460 /var/cache/yum/x86_64/14

    If you see that you have repo cache for other versions, then run clean all for the versions that have cache:

    # yum clean all --releasever=8
    # yum clean all --releasever=9
    # yum clean all --releasever=10
    # yum clean all --releasever=11
    # yum clean all --releasever=12
    # yum clean all --releasever=13
    # yum clean all --releasever=14
    Thanks pmdyer, this helped me understand better as to what is going on. In fact releasever=12 knocked off 200MB.

    ---------- Post added at 12:42 PM ---------- Previous post was at 12:36 PM ----------

    Quote Originally Posted by marko
    You could just move it out of the way, then do a new yum check-update:


    and see what happens. If something bad occurs just delete /var/cache/yum and move the old copy back
    to the original name.

    I don't think there'd be a problem.
    In fact you are right. I just moved the cache/yum out of the way. I did a yum check-update and yum update. The yum/cache directory structures were just recreated without a problem. The size is now down to about 75MB. So this solved my problem.

    Looks like there were a lot of older yum structures as the cache/yum went from multiple subdirs to one.

    Code:
    [pwalden@walden5 yum.old]$ ls
    adobe-linux-i386                             rpmfusion-free-updates
    anaconda-InstallationRepo-200906021801.i386  rpmfusion-nonfree
    fedora                                       rpmfusion-nonfree-updates
    i386                                         updates
    livna                                        updates-newkey
    rpmfusion-free
    [pwalden@walden5 yum.old]$ cd ../yum
    [pwalden@walden5 yum]$ ls
    i386

  7. #7
    Join Date
    Apr 2010
    Location
    uk
    Posts
    726
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Why is yum cache so big even after yum clean all?

    Thanks for this post, I thought my laptop's 40Gb hd was small.
    I managed to get rid of nearly 400 Mb, I have also removed loads of things that aren't needed, like all the non English fonts
    I'd also recommend setting your browser to delete the cache when it closes (if you haven't already)
    Last edited by bonedome; 30th May 2011 at 05:23 PM.
    fedora 14 fluxbox and gnome2 hp compaq nx9030 laptop 2Gb ram, helicopter landing pad, jacuzzi, mini fridge, gateway to alternative dimension

Similar Threads

  1. What's the best way to really clean /var/cache/yum?
    By dd_wizard in forum Using Fedora
    Replies: 9
    Last Post: 17th March 2011, 02:56 PM
  2. abrt clean cache ??
    By oxala in forum Using Fedora
    Replies: 1
    Last Post: 25th September 2010, 09:25 PM
  3. clean ABRT cache, is it safe?
    By Catastrophe in forum Using Fedora
    Replies: 2
    Last Post: 9th December 2009, 07:04 PM
  4. 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
  5. yum CLEAN fails to clean my house
    By blochbob in forum Using Fedora
    Replies: 9
    Last Post: 4th October 2004, 02:12 PM

Posting Permissions

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