Книга: Fedora™ Unleashed, 2008 edition

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 sizable amount of room on your hard drive. This cache is kept in /var/cache/yum, and you can manage it 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 pack ages themselves, the RPM header files, or both. To clean the system of just the packages, use the following command:

# yum clean packages

When I did this, yum removed all the downloaded packages on my system, saving me 450MB immediately.

If you also want to remove the header files, you can use the following command:

# yum clean headers

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

NOTE

If you decide to remove the header files, yum has to re-download 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 this command:

# yum clean all

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

Оглавление книги


Генерация: 1.229. Запросов К БД/Cache: 3 / 1
поделиться
Вверх Вниз