yum cheat sheet
Install and remove a package or multiple packages:
# yum install [foo] # yum remove [foo] # yum install [foo fie fo fum] # yum remove [foo fie fo fum]
Update an installed package:
- yum update [foo]
List available updates for installed packages:
# yum list updates
Update the whole system:
- yum update
Run automatic daily updates:
# chkconfig --level 345 yum on; service yum start
Search for a package when you know the name:
$ yum list [foo]
Search for a package when you're not sure of the name, using ordinary regular expression wildcards:
$ yum search [foo*] $ yum search [*foo?]
Find out which package a file belongs to:
$ yum provides [foo]
Yum has package groups that install big clumps of stuff at once. You can see a list of these:
$ yum grouplist
These are managed with almost the same commands as individual packages, with the group's name enclosed in single quotes:
# yum groupinstall 'FTP Server' # yum groupupdate 'FTP Server' # yum groupremove 'FTP Server'
By default, Yum queries your remote repositories every single time you run it, which are listed in /etc/yum.repos.d. This can get boring pretty quickly because it takes time to download fresh package lists. An alternative is to create a local Yum cache. To do this, add this line to /etc/yum.conf:
taken from Cheatsheet-Master-Linux-Package-Management