Working with Yum on CentOS

Yum (YELLOWDOG UPDATE MANAGER)
Searching/Listing package in List of packages:

List everything available to install from , a list of all packages

  • # yum list
  • # yum list | grep openssl

Example: list all packages starts with python

  • # yum list python*

Example: List of package names as openssl Install:

  • #yum list openssl

List all available versions of a package:

  • # yum –showduplicates list php
    • Available Packages php.x86_64 5.3.3-3.el6_1.3 base php.x86_64 5.3.3-3.el6_2.5 updates php.x86_64 5.3.3-3.el6_2.6 updates php.x86_64 5.3.3-3.el6_2.8 updates
  • # yum –showduplicates list python
    • Installed Packages python.x86_64 2.6.6-29.el6_2.2 @updates Available Packages python.i686 2.6.6-29.el6 base python.x86_64 2.6.6-29.el6 base python.i686 2.6.6-29.el6_2.2 updates python.x86_64 2.6.6-29.el6_2.2 updates

Searching into your Linux Box

Search a specific package in all installed packages in the box

  • # yum search <packagename>

For example search for openssl

  • # yum search openssl

 

Check if this file belongs which package

  • # yum provides nodejs
  • # yum provides */ssl

 

Find out the all locations where the package is installed:

  • # yum provides */nodejs

 

List the dependencies of a specific package

  • # yum deplist nodejs

 

Installing a package in your Linux Box:

Install Package in your machine:

  • # yum install <package_name>

Install a collection of Packages “group package” in your machine:

  • # yum groupinstall <group package name>

Updating a package in your Linux Box:

To update the list of YUM packages to the latest edition. This may take some time to get all the stuff updated.

  • # yum update
  • #yum groupupdate

 

Remove an installed package:

  • # yum remove <package name>
  • #yum groupremove <group package name>

Downgrade a package:

  • # yum install yum-allowdowngrade

List of software groups available to install

  • # yum grouplist
  • # yum grouplist | grep gn

 

List of available repolist for yum

  • #yum repolist all

 

Clean the package install cache:

  • # yum clean all

 

Other Yum Commands:

• yum-aliases
• yum-allowdowngrade
• yum-arch
• yum-basearchonly
• yum-changelog
• yum-cron
• yum-downloadonly
• yumex.noarch
• yum-fastestmirror
• yum-filter-data
• yum-noarch
• yum-kernel-module
• yum-kmod
• yum-list-data
• yum-merge-conf
• yum-metadata-parser
• yum-priorities
• yum-protectbase
• yum-protect-packages
• yum-refresh-updatesd
• yum-security
• yum-skip-broken
• yum-tsflags
• yum-updateonboot
• yum-updatesd
• yum-upgrade-helper
• yum-utils
• yum-versionlock

Advertisements

One thought on “Working with Yum on CentOS

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s