Difference between revisions of "yum cheat sheet"

From thelinuxwiki
Jump to: navigation, search
(Created page with " 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 insta...")
 
Line 18: Line 18:
 
Update the whole system:
 
Update the whole system:
  
# yum update
+
# yum update
 +
 
 +
housekeeping, will update repo lists and can fix update problems
 +
# yum clean all
  
 
Run automatic daily updates:
 
Run automatic daily updates:

Revision as of 18:33, 3 November 2014


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:

  1. yum update [foo]

List available updates for installed packages:

# yum list updates

Update the whole system:

# yum update

housekeeping, will update repo lists and can fix update problems

# yum clean all

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