RedHat like (CentOS, Scifi, SuSe, Fedora) package management


GENERAL NOTES
SEARCH PACKAGES
yum search packageSearch for a package. When you're not sure of the name, using ordinary regular expression wildcards * (many characters) and ? (single character)
yum search all packageSearch for a package from all fields. When you're not sure of the name, using ordinary regular expression wildcards * (many characters) and ? (single character)
yum info packageThis displays more information about any package installed or available
yum list packageSearch for a package when you know the name. When you're not sure of the name, using ordinary regular expression wildcards * (many characters) and ? (single character)
rpm -q packageSearch for an already installed package. No wildcards can be used.
rpm -qa packagelist.txtStore list of installed packages to file packagelist.txt. For specific package use with grep e.g. rpm -qa | grep package
yum provides fileFind out which package a file belongs to

INSTALL PACKAGES
yum install package1 package2Install packages package1 and package2. You can use option -y to automatically approve the installation
rpm -ivh packageInstall a package from current directory
yum localinstall package.arch.rpmInstall a package from current directory. localinstall is better than rpm -ivh package as it automatically does checking/satisfying dependencies

REMOVE PACKAGES
yum remove package1 package2Remove packages package1 and package2
rpm -ev package.arch.rpmRemove (Erase) an rpm package

UPDATE / UPGRADE
yum check-updateCheck and list all available updates
yum update packageUpdate only a certain package
yum updateUpdate all installed packages
yum list updatesList available updates for installed packages
rpm -Uvh package.arch.rpmUpgrade a certain rpm

MAINTENANCE
yum clean allClean all cached files from any enabled repository. All the files yum clean will act on are normally stored in /var/cache/yum
yum repolistList all the repositories and their status (enables/disabled)

GROUP INSTALL
yum grouplistList what package groups are available for groupinstall
yum groupinfo "GNOME Desktop"To see what the would be installed
yum groupinstall "GNOME Desktop"Install package group GNOME Desktop. You can use option -y to automatically approve the installation
yum groupupdate "GNOME Desktop"Updates the packages in specific package group
yum groupremove "GNOME Desktop"Remove the packages in specific package group