Archive:Docs/Drafts/AdministrationGuide/ManagingSoftware/YumCaching

Working with yum Caching
By default, current versions of  delete the data files and packages that they download, after these have been successfully used for an operation. This minimizes the amount of storage space that  uses. You may enable caching, so that  retains the files that it downloads in cache directories.

Caches provide three advantages:


 * The performance of  increases
 * You may carry out  operations without a network connection, by using only the caches
 * You may copy packages from the caches and reuse them elsewhere

By default,  stores temporary files under the directory , with one subdirectory for each configured repository. The  directory within each repository directory holds the cached packages. For example, the directory  holds packages downloaded from the development repository.

If you remove a package from the cache, you do not affect the copy of the software installed on your system.

Enabling the Caches
To configure  to retain downloaded files rather than discarding them, set the   option in   to  :

Refer to  Editing the yum Configuration for more information on editing the  configuration file.

Once you enable caching, every  operation may download package data from the configured repositories. To ensure that the caches have a set of package data, carry out an operation after you enable caching. Use a list or search query to download package data without modifying your system.

Using yum in Cache-only Mode
To carry out a  command without a network connection, add the   option. This causes  to proceed without checking any network repositories, and use only cached files. In this mode, yum may only install packages that have been downloaded and cached by a previous operation.

To search for the package  without using a network connection, enter the command:

Enter the password for the root account when prompted.

Clearing the yum Caches
If you configure it to do so,  retains the packages and package data files that it downloads, so that they may be reused in future operations without being downloaded again. To purge the package data files, use this command:

Run this command to remove all of the packages held in the caches:

When using these commands, at the prompt, enter the password for the root account.

Purging cached files causes those files to downloaded again the next time that they are required. This increases the amount of time required to complete the operation.