Yummy, yummy, yummy
Options
Most of the time, you can use Yum without any options. A few options, such as --obsoletes, provide useful information to help you administer software installation. A great many more, however, enable or disable information for various purposes.
Some options, such as -d and -e, which set debugging and error-level reporting, are largely for developers. The same is true of -v or --verbose, two equivalent options that increase the amount of information that Yum provides while running.
Other options are for users who want to use Yum with a minimum of fuss, such as --quiet, which causes Yum to run without reporting what it is doing. Its frequent companion is -y, which assumes that the answers to all questions are "Yes" – including the question of whether you want to proceed after Yum finishes its initial calculations. In much the same way, --nogpgcheck disables package verification.
Such options save time as well as your own watchfulness. However, I suggest that you avoid them on the general principle that giving up control is rarely a good idea. If nothing else, something as simple as a typing error could start Yum off on a series of actions that could trash your system – or at least require some careful repairs.
Other options are less likely to cause trouble. The matched pair --enable-repo= and disable-repo= give Yum the equivalent of apt-get's pinning and specify which repositories to use. Also, you can use --exclude= to prevent packages that could cause a conflict from installing from any source.
Another option that might keep you out of trouble is --skip-broken. If you use it after Yum reports a missing dependency, it might just allow you to resolve the difficulty. In some cases, the packages installed with this option will not work, but you can make sure that they do not form a bottleneck that keeps Yum from working. Once they are installed, you can then delete them normally.
Plugins
Yum's commands and options provide all the functionality most users will need. However, if you're looking for something extra, or you want to see what the future of Yum might be, take the time to look at the plugins available for your distribution. Written in Python, Yum plugins are available as separate packages for your distribution, with each plugin adding new features.
By default, plugins are not turned on. Before you can use any of them, you need to open /etc/yum.conf and add or edit the plugins line in the main section of the file to read plugins=1.
In Fedora and Red Hat, some of the most common plugins are available in the yum-utils package. Approximately another 20 plugins are also currently available. Their functionality covers almost everything you can imagine and is too much to describe in detail here.
Briefly, though, some useful Yum plugins in Fedora 11 are:
- yum-plugin-version-lock: Prevents a particular version of a program from being overwritten.
- yum-plugin-protects-packages: Prevents designated packages (including Yum) from being removed.
- yum-plugin-allowdowngrades: Allows you to downgrade a package – an operation that is needed sometimes for compatibility between packages.
- yum-plugin-fastest-mirror: Lists the fastest mirrors for the repositories you request.
- yum-presto: Instructs Yum to look for DeltaRPMs rather than straight RPMs. DeltaRPMs are packages that include only changes in a package, so by using them, you can install a package faster and with less bandwidth.
- yum-plugin-security: Adds options to limit upgrades to those for security.
Many, if not all, plugins work automatically, so they do not include any man pages or help. However, you can see which plugins are installed on your system with the command yum search yum.
Very occasionally, you might find that a plugin, or perhaps a conflict between two or more plugins, prevents Yum from working properly. If that happens, you can use the option --disableplugin= [plugin name] to help you troubleshoot by disabling a specific plugin. If you are in serious difficulties, you can use the option --noplugins to run Yum without any plugins so that, with any luck, you can recover.
Other Package Managers
Yum is not the only RPM-based package manager available. Mandriva uses a similar tool called urpmi, and openSUSE uses Smart, a manager that not only resembles Yum but can install from Yum repositories. Other package management systems include Gentoo's Portage and Conary, which include version control that allows you to install different releases of the same packages.
However, Yum is almost certainly the most commonly used package manager after Debian and Ubuntu's apt-get. Furthermore, because Yum was developed years after apt-get, its developers had the chance to learn from apt-get and improve on it.
Although you probably won't see much in Yum that isn't in apt-get and its related utilities, you will find a less haphazard organization. In fact, if you know apt-get and are encountering Yum for the first time, you will likely be struck by how structured Yum is and how much easier it is to learn than apt-get. As a program, Yum is an intelligent innovation – and as a remedy for dependency hell, nothing short of a godsend.
« Previous 1 2
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
So Long Neofetch and Thanks for the Info
Today is a day that every Linux user who enjoys bragging about their system(s) will mourn, as Neofetch has come to an end.
-
Ubuntu 24.04 Comes with a “Flaw"
If you're thinking you might want to upgrade from your current Ubuntu release to the latest, there's something you might want to consider before doing so.
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.