Maintaining yum


Maintaining yum

Over time yum can build up a large cache of RPM headers and other assorted information that can gradually build up to occupy a sizeable amount of room on your hard drive. This cache is kept in /var/cache/yum and can be managed by using the yum command with your choice of options.

After yum finishes with the packages it downloads, it does not automatically delete them from the system even though you might have no further use for them. After only one invocation of yum update I found that my cache file had blossomed to just over 500MB in size. A few months down the line and this could grow exponentially as new updates, bug fixes, and security patches become available.

As with all things in Fedora, you get a choice as to what you want to remove: the packages themselves, the RPM header files, or both. To clean the system of just the packages, you should use the command

#yum clean packages


By doing this, yum removes all the downloaded packages on my system, saving me 450MB in one go.

If you want to remove the header files, too, you can use the command

#yum clean headers


This saves an extra 10MB on top of the 450MB that removing the packages gave me.

Note

If you decide to remove the header files, yum will have to redownload them the next time that you decide to update your system. This can take a little bit of time, but should not be a problem if you have a fast broadband connection.


Finally, if you want to remove both the packages and the headers in one quick step, you should use the command

#yum clean all


This removes all packages and headers from the cache. We suggest just using the command to clean the packages, especially if you are on a slow Internet connection, because keeping the headers will save you time in future updating sessions.



Red Hat Fedora 5 Unleashed
Red Hat Fedora 5 Unleashed
ISBN: 067232847X
EAN: 2147483647
Year: 2004
Pages: 362

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net