2011-06-14

A Reference on Yum, Yellowdog Updater, Modified

Recently, I had to mess with yum a lot. It is a powerful command line package management tool for RPM packages, and if you want to do automatic mass installations and updates, as in my case, GUI is not an option. I have collected the commands I have used among others, and created a reference.

All these commands have been tested on Scientific Linux 6.0 x86_64.
The version of yum I have used is 3.2.27.

# A reference to Yum, Yellowdog Updater, Modified
# http://caglartoklu.blogspot.com

# Yum is a command line package manager for
# RPM-compatible Linux operating systems.

Note that these commands requires root privileges.

# _____ Updates

# Check for availability package updates.
yum check-update

# Update all installed packages.
yum update

# Update a specific package.
yum update package_name
# Example:
yum update mc



# _____ Searching and finding about what to install

# List the depencies of a package.
yum deplist package_name
# Example:
yum deplist emacs

# Search a string in the metadata of packages.
# This metadata includes: name, summary,
# description, url.
yum search ri

# Let's say you want the command 'ri' but
# do not know which package is providing it. Type:
yum provides ri
# and you will see that 'ruby-ri-1.8.7.299....'
# package os providing it.

# Information about a package.
# Note that the package does not have to be
# installed on your system, it will display
# the information anyway.
yum info package_name
# Example:
yum info mc

# Install a package or packages.
yum install package_name
yum install package_name1 package_name2
# Example: yum install mc

# List the packages.
yum list all
yum list available
yum list updates
yum list installed
yum list extra
yum list obsoletes
yum list recent



# _____ Installing and removing packages

# Remove a package or packages from your system.
yum remove package_name
yum remove package_name1 package_name2
# erase command can also be used.
yum erase package_name
yum erase package_name1 package_name2

# Install a package or packages.
yum install package_name1 package_name2
# Example:
yum install mc emacs

# You can also install a package for a specific
# architecture like this:
yum install package_name.architecture
# See 'Specifying package names' in this document.
# Architecture can be x86_64 or i386.
# Example:
yum install mc.x86_64

# Install a local RPM.
yum localinstall package_name

# Update the distro using the RPMs saved locally.
# cd to the directory you saved your rpms, and type:
yum localupdate *.rpm



# _____ Downloading packages

# Download a package (current directory by default)
yumdownloader package_name
# If you do not have the yumdownloader,
# install yum-utils using:
yum install yum-utils



# _____ Groups

# See the list of groups installed:
yum grouplist
# This command will first list the installed groups,
# then the available ones.

# After seeing the list, see the information about.
# about a group. If the group name includes a space,
# enclose the group name with ' character.
yum groupinfo group_name
# Example:
yum groupinfo 'FTP server'

# Install packages of a group. Note that default
# and mandatory ones will be installed.
yum groupinstall group_name
# Example:
yum groupinstall 'FTP server'

# Update packages of a group.
yum groupupdate group_name
# Example:
yum groupupdate 'FTP server'

# Remove all packages of a group.
yum groupremove group_name
# Example:
yum groupremove 'FTP server'



# _____ Specifying package names

# A package can be referred to for install, update,
# list, remove etc with any of the following:
name
name.arch
name-ver
name-ver-rel
name-ver-rel.arch
name-epoch:ver-rel.arch
epoch:name-ver-rel.arch


# _____ Shell

# To start the interactive shell, type:
yum shell


# _____ References

http://www.linuxcommand.org/man_pages/yum8.html
http://yum.baseurl.org/
http://en.wikipedia.org/wiki/Yellowdog_Updater,_Modified 


If you do not see the code, you may be running a JavaScript blocker. Then you can directly jump to the source of the code on Pastebin: http://pastebin.com/dbCHYEh0

No comments:

Post a Comment