Created
November 16, 2013 21:05
-
-
Save varvaruc/7505330 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Yum Tricks and Tips | |
Note: These tricks are only available on SLF5 and newer releases. They require yum 3.2.22 or newer. | |
yum provides (feature) | |
Is used to find out what package provides some feature. | |
Example: yum provides zip | |
yum provides "*/(file)" | |
Is used to find out what package provides a certain file. This is especially useful when you are compiling some code and get an error like "error: libbluetooth.so.2 not found, exiting." | |
Example: yum provides "*/libbluetooth.so.2" | |
yum makecache | |
Is used to download and make usable all the metadata for the currently enabled yum repos. | |
yum --showduplicates (command) (package) | |
Doesn't limit packages to their latest versions in the info, list and search commands | |
Example: yum --showduplicates list firefox | |
yum downgrade | |
Will try and downgrade a package from the version currently installed to the previously highest version (or the specified version). The depsolver will not necessarily work, but if you specify all the packages it should work (and thus. all the simple cases will work). Also this does not work for "installonly" packages, like Kernels. downgrade operates on groups, files, provides and filelists just like the "install" command. | |
Examples: | |
yum downgrade glibc\* | |
yum downgrade firefox-3.6.7-3.el5 | |
yum reinstall | |
Will reinstall the identically versioned package as is currently installed. | |
Example: yum reinstall yum | |
yum-complete-transaction | |
is a program which finds incomplete or aborted yum transactions on a system and attempts to complete them. This program is in the yum-utils package. | |
yum install yum-utils | |
Example: yum-complete-transaction | |
Yum Group Tricks | |
Note: You will see the following "group name" in these tips. You need to keep the quotes on the name when doing this, because some group names have a space in them. So if the group name was KDE Desktop, you would install it by doing yum install "KDE Desktop" | |
yum grouplist | |
Is used to list the available groups from all yum repos. Groups are marked as "installed" if all mandatory packages are installed, or if a group doesn't have any mandatory packages then it is installed if any of the optional or default package are installed. | |
yum groupinfo "group name" | |
Is used to give the description and package list of a group | |
yum groupinstall "group name" | |
Is used to install all of the individual packages in a group. This works as if you'd taken each of those package names and put them on the command line for a "yum install" command. | |
yum groupremove "group name" | |
It is worth pointing out that packages can be in more than one group, so "groupinstall X Y" followed by "groupremove Y" does not do give you the same result as "groupinstall X". | |
yum groupupdate "group name" | |
Is just an alias for groupinstall, which will do the right thing because "yum install X" and "yum update X" do the same thing, when X is already installed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment