From Fedora Project Wiki

Using yum for Fedora Core 1

yum (Yellow dog Updater, Modified) is an automated package management program which may be used to install, remove, and update packages on an RPM based system. It will help you to keep your system up to date and is included by Fedora Core 1.

Step 1: Preliminaries

Linux prevents ordinary users from installing, removing, or modifying system software, libraries, and important configuration information. So you must have root access to proceed. You may either login as the root user, or use the su (or sudo) commands to become the root user on the machine.

Note: Be careful when running as root! Be sure to logout of the root account as soon as you are done. Running as root is dangerous, and should only be used when needed. Typos or mistakes can destroy your system or your data, so it is important that you be careful when running as root.

When you are running as root, your prompt will be changed to the # character. In the command examples below, we include this prompt, however you should not type the # character when entering a command!

Yum 2.x depends on the gnupg RPM which may not be installed or up to date on your system. To be sure you have the needed versions, execute the following command as root:


Step 2: Install yum

To install yum, use the following command as the root user on your machine:


Step 2: Configure yum

yum from Fedora Core 1 is not configured to use Fedora Legacy for updates. You will need to reconfigure it to use Fedora Legacy to continue to receive updates. You can use the main Fedora Legacy download site, or one of its mirror sites (recommended).

You can find a list of current Fedora Legacy mirrors at http://www.fedoralegacy.org/download/mirrors.php.

Yum uses the file /etc/yum.conf to decide where to download updates from. This file needs to be configured to work with the Fedora Legacy repositories. Edit or create your /etc/yum.conf file to read as follows:


[main] 
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
exclude=kernel*

[base] 
gpgcheck=1
name=Fedora Core $releasever - Base
baseurl=http://download.fedoralegacy.org/fedora/$releasever/os/$basearch

[updates] 
gpgcheck=1
name=Fedora Core $releasever updates
baseurl=http://download.fedoralegacy.org/fedora/$releasever/updates/$basearch

[legacy-utils] 
gpgcheck=1
name=Fedora Legacy utilities for Fedora Core $releasever
baseurl=http://download.fedoralegacy.org/fedora/$releasever/legacy-utils/$basearch

Step 2.1: Add the GPG keys to root's keyring

All Fedora Legacy packages are signed with GPG keys. All packages should be verified using these keys. See http://www.fedoralegacy.org/about/security.php for more information.

In order to properly verify the packages, you need to add the appropriate PGP keys to your system. To import the keys, use the following commands as the root user:


Step 3: Update your system

Once you have installed the yum package, you should run the following command as the root user on your system to update your system:


This command will first check for and download any new update headers (header files contain information about packages, including dependency information) to your system's yum cache, and check if any updates are available for packages already installed on your system. If no updates are available for your system, it will display messages to that effect and exit. If updates are available for your system, it will calculate which packages are needed, including any packages needed to resolve dependencies, and present this list to you. At this point, it will ask you if you want to proceed, by prompting you with the question:

Is this ok [y/N] :

Answer with "y" (followed by the Enter key) to proceed with the updates, or "n" (followed by the Enter key) to abort the updates. (Note that the default reply is "n", so that simply pressing the Enter key without entering "y" will be the same as entering "n").

If you answer "y" then yum will download all the actual RPM packages needed to your system's yum cache, check for sufficient disk space to install the updates, and then apply them to your system. (If you answer "n", nothing will be done).

Warning: This may take some time on your first use of yum, depending on how up to date your system is and the speed of your internet connection!

Step 4: Decide if you want automatic updates

yum has the ability to automatically apply (download/verify/install) all updates to your system, but this feature is disabled by default. Please refer to this autoupdates discussion to see if automatic updates are right for you, and additional information about automatic updates. If you want to enable that functionality, please enter the following command as the root user on your system:


After typing the last line, you should see a message on the screen confirming that nightly updates are now enabled. After that, yum will update your system through the cron job /etc/cron.daily/yum.cron, which will run every night (or later through anacron, if your system isn't running all the time).

Please note that the above depends on a working cron setup on your machine! You can check the cron log file /var/log/cron to verify it is working. There should be at least one hourly entry each hour, and one daily entry each day.

You can check what yum updates are being done by looking at the yum log file var/log/yum.log for recent entries.

Step 5: Subscribe to fedora-legacy-announce

You may subscribe to the fedora-legacy-announce mailing list to be informed by e-mail when new updates become available. This step is optional, but highly recommended.

Step 6: Please help us with our service!

The Fedora Legacy project is always in the need of helping hands. Please check the LegacyParticipate page to see what you can do to help us. As we're a community project, our success will heavily depend on helping hands – possibly you!

If you find a problem with an update published by The Fedora Legacy Project, or in The Fedora Legacy Project documentation, please let us know!

Step 7: Optionally learn additional features of yum

Below is a summary of some of the more advanced features of yum for those who wish to know more. You do not need to know these commands to keep your system updated; they are simply provided for those who want to learn more about using yum to its fullest.

yum list
List all available software.
yum check-update
See if there are updated packages available.
yum update
Update all installed packages that have a newer version available.
yum install <packagename>
Install specific package(s) (and its dependencies, if missing any).
yum search <word>
Search all known packages entries (descriptions etc) for <word>.
yum info <packagename>
Show basic information about a package.