≡ Menu

yum command: Update / Install Packages Under Redhat Enterprise / CentOS Linux Version 5.x

How do I use yum command to update and patch my Red hat Enterprise Linux / CentOS Linux version 5.x server via RHN / Internet? Can I use up2date command under RHEL 5?

up2date command was part of RHEL v4.x or older version. You need to use yum command to update and patch the system using RHN or Internet. Use yum command to install critical and non-critical security updates as well as binary packages. Login as the root user to install and update the system.

Task: Register my system with RHN

To register your system with RHN type the following command and just follow on screen instructions (CentOS user skip to next step):
# rhn_register

WARNING! These examples only works with RHEL / CentOS Linux version 5.x or above. For RHEL 4.x and older version use up2date command.

Task: Display list of updated software (security fix)

Type the following command at shell prompt:
# yum list updates

Task: Patch up system by applying all updates

To download and install all updates type the following command:
# yum update

Task: List all installed packages

List all installed packages, enter:
# rpm -qa
# yum list installed

Find out if httpd package installed or not, enter:
# rpm -qa | grep httpd*
# yum list installed httpd

Task: Check for and update specified packages

# yum update {package-name-1}
To check for and update httpd package, enter:
# yum update httpd

Task: Search for packages by name

Search httpd and all matching perl packages, enter:
# yum list {package-name}
# yum list {regex}
# yum list httpd
# yum list perl*

Sample output:

Loading "installonlyn" plugin
Loading "security" plugin
Setting up repositories
Reading repository metadata in from local files
Installed Packages
perl.i386                                4:5.8.8-10.el5_0.2     installed       
perl-Archive-Tar.noarch                  1.30-1.fc6             installed       
perl-BSD-Resource.i386                   1.28-1.fc6.1           installed       
perl-Compress-Zlib.i386                  1.42-1.fc6             installed       
perl-DBD-MySQL.i386                      3.0007-1.fc6           installed       
perl-DBI.i386                            1.52-1.fc6             installed       
perl-Digest-HMAC.noarch                  1.01-15                installed       
perl-Digest-SHA1.i386                    2.11-1.2.1             installed       
perl-HTML-Parser.i386                    3.55-1.fc6             installed   
perl-libxml-perl.noarch                  0.08-1.2.1             base            
perl-suidperl.i386                       4:5.8.8-10.el5_0.2     updates 

Task: Install the specified packages [ RPM(s) ]

Install package called httpd:
# yum install {package-name-1} {package-name-2}
# yum install httpd

Task: Remove / Uninstall the specified packages [ RPM(s) ]

Remove package called httpd, enter:
# yum remove {package-name-1} {package-name-2}
# yum remove httpd

Task: Display the list of available packages

# yum list all

Task: Display list of group software

Type the following command:
# yum grouplist

Installed Groups:
   Engineering and Scientific
   MySQL Database
   System Tools
   Text-based Internet
   Legacy Network Server
   DNS Name Server
   Dialup Networking Support
   FTP Server
   Network Servers
   Legacy Software Development
   Legacy Software Support
   Development Libraries
   Web Server
   Printing Support
   Mail Server
   Server Configuration Tools
   PostgreSQL Database
Available Groups:
   Administration Tools
   Development Tools
   GNOME Software Development
   X Software Development
   GNOME Desktop Environment
   Authoring and Publishing
   Games and Entertainment
   Java Development
   X Window System
   Windows File Server
   KDE Software Development
   KDE (K Desktop Environment)
   Sound and Video
   FreeNX and NX
   News Server
   Yum Utilities
   Graphical Internet

Task: Install all the default packages by group

Install all ‘Development Tools’ group packages, enter:
# yum groupinstall "Development Tools"

Task: Update all the default packages by group

Update all ‘Development Tools’ group packages, enter:
# yum groupupdate "Development Tools"

Task: Remove all packages in a group

Remove all ‘Development Tools’ group packages, enter:
# yum groupremove "Development Tools"

Task: Install particular architecture package

If you are using 64 bit RHEL version it is possible to install 32 packages:
# yum install {package-name}.{architecture}
# yum install mysql.i386

Task: Display packages not installed via official RHN subscribed repos

Show all packages not available via subscribed channels or repositories i.e show packages installed via other repos:
# yum list extras
Sample output:

Loading "installonlyn" plugin
Loading "security" plugin
Setting up repositories
Reading repository metadata in from local files
Extra Packages
DenyHosts.noarch                         2.6-python2.4          installed       
VMwareTools.i386                         6532-44356             installed       
john.i386                             installed       
kernel.i686                              2.6.18-8.1.15.el5      installed       
kernel-devel.i686                        2.6.18-8.1.15.el5      installed       
lighttpd.i386                            1.4.18-1.el5.rf        installed       
lighttpd-fastcgi.i386                    1.4.18-1.el5.rf        installed       
psad.i386                                2.1-1                  installed       
rssh.i386                                2.3.2-1.2.el5.rf       installed  

Task: Display what package provides the file

You can easily find out what RPM package provides the file. For example find out what provides the /etc/passwd file:
# yum whatprovides /etc/passwd
Sample output:

Loading "installonlyn" plugin
Loading "security" plugin
Setting up repositories
Reading repository metadata in from local files

setup.noarch                             2.5.58-1.el5           base            
Matched from:

setup.noarch                             2.5.58-1.el5           installed       
Matched from:

You can use same command to list packages that satisfy dependencies:
# yum whatprovides {dependency-1} {dependency-2}
Refer yum command man page for more information:
# man yum

Share this tutorial on:

Your support makes a big difference:
I have a small favor to ask. More people are reading the nixCraft. Many of you block advertising which is your right, and advertising revenues are not sufficient to cover my operating costs. So you can see why I need to ask for your help. The nixCraft, takes a lot of my time and hard work to produce. If you use nixCraft, who likes it, helps me with donations:
Become a Supporter →    Make a contribution via Paypal/Bitcoin →   

Don't Miss Any Linux and Unix Tips

Get nixCraft in your inbox. It's free:

{ 78 comments… add one }
  • Fil January 14, 2009, 11:44 pm

    Is it possible to update a red hat enterprise 5, without red hat network registration??


    • Santosh yadav July 20, 2011, 10:29 am

      yes u can update.

    • krishnadas August 19, 2013, 6:33 am

      Change the repository to cent os repos..then you can update it.

      • Narsi July 30, 2014, 2:08 pm

        use oracle linux repos, it will work

  • santosh April 8, 2009, 2:23 pm

    Hello there

    Hi am having problem entering graphic mode in RHEL 5.0,
    When am booting into os, It coming up with an error
    Cant find x-server, Try to install x-server….
    and then it going to text mode for a min and throwing that error
    Can any one help me plssss

    thnx in advance

    • vikram July 27, 2010, 3:54 am

      i found that something u have entered in inittab,u just change the appropriate run level and change to x-server environment…..the locaton of intitab is vim /etc/inttab…

    • sumit August 26, 2010, 7:57 am

      go to /etc/inittab make settings of runlevels

  • mohan April 14, 2009, 7:00 am

    Hi santosh

    allready u gone text mode u give command init 5 it is find graphical mode

  • mohan April 14, 2009, 7:04 am

    Hello there

    Hi am having problem entering graphic mode in RHEL 5.0,
    When am booting into os, It coming up with an error
    Cant find x-server, Try to install x-server….
    and then it going to text mode for a min and throwing that error
    Can any one help me plssss

    thnx in advance

    • Pushkar kumar June 21, 2011, 4:52 pm

      Hi mohan,
      how r u,
      your problem is booting error
      because u system unintall x-server. so pls install the x-server,

      • mitesh July 17, 2013, 7:15 am

        hi puskhar kumar,
        if you want to install linux or fedora or centos first of all you set a bois setup to first set a cdrom to select for booting process then restart your system and then press f9 then automatically to process for a next version installation.

  • Yum May 6, 2009, 2:05 pm

    It is possible to configure yum to install rpms from local media, using the following method:

    1. Create a new repository file: /etc/yum.repos.d/local.repo

    2. Type the following:

    name=Red Hat Local Repository

    The baseurl should be web-encoded (ie space=%20) point to the local media which contains the rpms to install and any dependent rpms, and the folder repodata/ with repomd.xml and TRANS.TBL.

    3. Finally, run (as root):

    yum install [package]

    • shailendra October 12, 2010, 11:41 am

      nice feature

  • manidhar karan June 20, 2009, 6:13 am

    thanks to hellp

  • PCMaind July 8, 2009, 11:29 am

    this is to better commands of other command
    bcoz another commands are so hard it is true
    and this commands is very simple .

    so thanks for this commands,
    bye tc , have good day all .

  • PCMaind July 8, 2009, 11:34 am

    i have a problem about a ubuntu (linux),
    the error show, when i insert a disk of film in dvdrom then the error shows

    the PlayBack of this movie requires a VCD protocol source plugin which is not installed

    plz give me a solucation about this error.

  • milan July 12, 2009, 9:10 am

    4 yum installation
    stp1- cp /etc/yum.repos.d/rhel(press tab) /etc/yum.repos.d/Server.repo
    stp2- vi /etc/yum.reppos.d/Server.repo
    stp3- in 3rd lin after ftp giv //ur machine ip/pub/Server (becz my Server is copy 2 pub)
    stp4- createrepo -v /var/ftp/pub/Server
    stp5- service vsftpd restart
    stp6- yum update
    thank u i am 2nd year eng student

  • adeniyi morakinyo August 12, 2009, 2:21 pm

    i have this error when instaling yum

    # yum update
    There was a problem importing one of the Python modules
    required to run yum. The error leading to this problem was:

    No module named sqlitecachec

    Please install a package which provides this module, or
    verify that the module is installed correctly.

    It’s possible that the above module doesn’t match the
    current version of Python, which is:
    2.4.3 (#1, Jan 14 2008, 18:32:40)
    [GCC 4.1.2 20070626 (Red Hat 4.1.2-14)]

    If you cannot solve this problem yourself, please go to
    the yum faq at:

    • lol May 19, 2016, 3:26 pm

      yum install sqlitecachec

  • ashish August 20, 2009, 8:21 am

    This is wonderful way to learn possible problems.

  • tosa August 21, 2009, 9:42 pm

    I had installed yum from package cd.
    I am having dell inspiron 1525 and have problem in running wifi , so can yum help me to install my wifi drivers compatible to my machine.

  • The Doctor October 30, 2009, 3:45 pm

    Thank you for this post. I didn’t know about the ‘groupremove’ function of YUM. That’s going to save HOURS of time later!

  • phanindra November 11, 2009, 6:59 am

    Hi hello, this is phanindra
    I am having dell latitude 510 lappy and having a problem in running wifi, so can u help me hou to install the wifi drivers tat r compatible to my machine

  • sivaraj December 2, 2009, 8:21 am

    how to take system backup on centos through graphical mode

  • charanjit December 11, 2009, 12:22 pm


    I want to whats the command to install all the RPMS in one command in RHEL5.


  • kamla nand raman December 28, 2009, 4:44 am

    This is the best class architecture of installation of yum.

    your team…

  • Ashish bachchan January 27, 2010, 10:51 pm

    I’m having problem in installing VLC media player can someone help me I’ll gratefull to the person.
    I’ve even configured YUM but still I think there is something to know that I don’t so please some body help me ………….

    Ashish Bachchan

    • Santosh September 7, 2011, 9:24 am

      install using
      yum install vlc* for centos,redhat,
      sudo apt-get install vlc* for ubauntu


  • gulshah February 3, 2010, 11:59 am

    thanks allot

  • Santosh M April 7, 2010, 1:33 pm

    What is the command to add a YUM service on RHEL agent?


  • adminCAE April 10, 2010, 4:53 pm

    Hi all,

    I have a problem with installation of an software. I have installed on my laptop CentOS5.4 with all repositories activate (I think) and yum upgrade and update. I working in engineering domain, so I am curious how works ANSYS 11 on Linux 64 biti (at my work I use ANSYS on windows).
    I installed first on Ubuntu9.10 (unfortunately not all modules works fine) and installation it was ok, and I tested and everything works done. After that I try to install it on CentOS because this software is made to works done only on Rhel platform (.rpm). So, I encountered the next message, which I don’t understand what means and why appear:

    >bash: ./INSTALL: /bin/sh: bad interpreter: Permission denied

    after that I try:

    >rpm -i INSTALL

    after that I try:

    >sudo ./INSTALL
    sudo: unable to execute ./INSTALL: Success

    I waiting yours answer or opinion reffering to my problem, because I’m very curious.

    Best regards

    • Leonardo April 28, 2010, 7:25 pm

      I think you’ll find that the INSTALL file is a text file that gives you instructions on how to compile, then install the program from source.
      This install method typically involves:
      >./make install

      If you have the rpm available, use the “ls” command to search the relavant directory and find the *.rpm file. That’s what you’ll want to run the “rpm -i” command with.

      As far as the INSTALL file: instead of trying to execute it, use your favorite editor to view it, or use the cat command:
      > cat ./INSTALL |less

      • xtatuto May 8, 2010, 2:27 pm

        Just to add a side note, you don’t use “./” with make and make install, you should only use it with configure, so it would be
        # ./configure
        # make
        # make install

  • peter June 17, 2010, 11:54 pm

    It’s not a bad idea to run the command:

    # yum check-updates

    This will let you know which packages are due to be updated without actually running the update. Saves a bit of bother if there is a major upgrade about to happen.

  • Feck McConnell June 23, 2010, 7:12 pm

    So, how do you update an installed yet outdated rpm, when YUM doesn’t find any updates for it?

    • dtolj April 13, 2011, 9:58 pm

      @Feck McConnel
      You can try issuing 3rd party repositories on RH/CentOS such as EPEL, RPMFusion are two good choices, these might have more recent version of your software but remember that RH/CentOS are more geared for stability rather than bleeding edge. In that case you can try Fedora.

  • Rex July 23, 2010, 8:42 pm

    Why can’t RedHat make YUM work right? and why can’t they call it something a little more descriptive? Linux is crap! Program names don’t even describe what a program does! How can anything be more non-userfriendly!

    • nixCraft July 23, 2010, 9:05 pm

      Have you tried out yum info command?

      yum info packageName
      yum info httpd
      yum list 
      yum list httpd
      yum list | less
  • ravi August 1, 2010, 6:31 am

    how to find all softwares that will install with yum

  • scarluc August 24, 2010, 8:14 pm

    Hello! I need to install a specific version of packages, for example, if the last version of “seamonkey” is “seamonkey-1.0.9-0.57.el3.i386.rpm” I need to install seamonkey-1.0.9-0.45.el3.i386.rpm, is that possible? obviously I know which is the number of the previous version.
    Excuse me for my english.

    Thanks so much

  • suchi September 9, 2010, 12:53 pm

    I am using CentOS5.5 and I want to install few packages through yum.

    like gnome-libs,XFree-libs etc. But when I run “yum install gnome-libs” it gives no
    package available.

    Can you suggest me how to update yum to make these package available?


    • dtolj April 13, 2011, 9:55 pm

      the guide suggests doing this:
      yum whatprovides gnome-libs

      • HFalahati June 11, 2011, 6:42 am

        I use this command to install screen on centos
        ” yum whatprovides screen”
        but it shows this error :
        ” Warning: 3.0.x versions of yum would erroneously match against filenames.
        You can use “*/screen” and/or “*bin/screen” to get that behaviour
        No Matches found”
        I use ” yum whatprovides */screen ”
        ” ncurses-5.5-24.20060715.i386 : A terminal handling library
        Repo : Rocks-5.4
        Matched from:
        Filename : /usr/share/terminfo/s/screen”

        and something like this, but when I type “screen”, it says :
        “-bash: screen: command not found”

        I use this command too “yum whatprovides */bin/screen ”
        “Rocks-5.4/filelists | 1.4 MB 00:00
        No Matches found”

        Please help me.
        Thanks in advance.

  • meitham September 28, 2010, 10:12 am

    yum is crap, it was modelled after aptitude which is the debian packages manager, apt is way better than yum, and debian is a kickass to redhat.

  • Sam November 23, 2010, 7:54 pm

    100 Linux servers which are part of production, doesn’t have access to internet. It’s in private DMZ. YUM will not work here. How would you install the latest patches?

  • dtolj April 13, 2011, 9:53 pm

    Have a look at RHN Proxy Server,
    It allows you to cache rpms internally and distribute them to your local network.

  • leo April 26, 2011, 11:12 pm

    hi all,

    I have installed centos 5.4, after install i have wired internet connection, but I want to use, my wireless adapter. I go to System>Administration>Networks and have it activited, but it has a message, error in wireless request “set encode” (8B2A). And it can’t determine IP address. Do you think it has to do with the driver of the wireless card? how to install them?
    thank you in advance. I really need your help.. :D


  • Mahesh April 28, 2011, 6:19 am

    Hi All,

    How Can i Group Multiple packages in One repo file and when i fire group install command along with yum all the package will be installed.

  • mayank June 16, 2011, 7:46 am

    I am using RHEL 5 and I want to install few packages whit yum.

    like vlc media player , real player etc. But when I run “yum install *vlc*nad *realplayer * it gives
    no package available.

  • saeid August 1, 2011, 8:23 pm

    i’m install netconfig with using of yum : yum install netconfig.
    but i cant use netconfig and i dont find related file.i want to know how to i can use netconfig.
    thank so much and excuse for bad language.

  • senthil September 3, 2011, 6:12 am

    i’m install vlc player with using rpm commands but i can’t install vlc because this error has occured so pls help me
    [root@senthil ~]# rpm -ivh /home/senthil/Desktop/gstreamer-ffmpeg-0.10.11-1.fc14.src.rpm
    warning: /home/senthil/Desktop/gstreamer-ffmpeg-0.10.11-1.fc14.src.rpm: Header V3 RSA/SHA256 Signature, key ID 865cc9ea: NOKEY
    1:gstreamer-ffmpeg warning: user mockbuild does not exist – using root
    warning: group mockbuild does not exist – using root
    ########################################### [100%]
    warning: user mockbuild does not exist – using root
    warning: group mockbuild does not exist – using root

    • shimnas May 14, 2013, 1:55 pm

      hi frind
      plase login user root.then u try

    • Dan March 6, 2015, 5:56 pm

      I don’t see any errors, I only see warnings with explanations afterwards of what is happening instead of the default.
      (e.g. the user ‘mockbuild’ not existing, so it’s using root)
      Your (source) RPM has been installed. You might want to install the binary RPM, however. The source RPM is only going to contain the source code, which isn’t going to help you unless you’re compiling it for some custom use.

  • makarim September 17, 2011, 5:34 am

    i’am makarim come from indonesia…
    i have installed RHEL 5.7 and Oracle 10.02g (64 bit)
    i will install apache and php5,, can you help me step by step how to install it ?

  • Brandon December 5, 2011, 2:29 pm

    I have not worked with Red Hat in quite a while I am glad I found this site it gave me a little refresher on update commands. This helped me complete my task that I was working on. Thank You

  • New December 24, 2011, 5:13 pm

    I want to install some packges using apt-get command. please how to do.


  • surya January 24, 2012, 11:15 am


    yum repolist command was working fine till recently. But, all of a sudden it is not working. it is giving an error

    OpenSSL.SSL.Error: [(‘SSL routines’, ‘SSL23_GET_SERVER_HELLO’, ‘unknown protocol’)]

    I am able to ping rhn.redhat.com from the system.

    What may be the problem ? pls. guide.

  • Arvind June 17, 2012, 12:34 am

    Hello frinds
    I am having problem with my wifi connection. It is of Broadcom. but Linux Enterprize 5 always give error for dhcp at startup and i have tried a lot to configure my wifi setting manually but i am not successful in doing so. so please help me , i am new to linux and i am self lerner

  • Lakshman June 28, 2012, 5:56 am

    I am facing lot of problem in centos I installed 4.8 server but problem is can’t update any package and can’t go forward for GUI mode. Please help me how to do resolve this problem.

  • Soundarrajn July 10, 2012, 1:04 pm

    Hi guys.

    I’m learning Linux and i have two users in my rhel6 root and redhat users.
    i want to give superuser power to redhat user, how to do it???

    please help me.

  • pravesh September 5, 2012, 10:20 am

    Wht if i have more than one yum repo than how could i install a particular package from a particular repo??

  • naushad September 12, 2012, 12:45 pm

    how to instaall nimbuzz in redhat

  • Anusha October 15, 2012, 2:31 am


    Im trying to access a test machine via the portal on a different windows box.
    Its shows error: 502. i guess its related to DNS server settings.. can u help me out..

  • bnvpavan October 25, 2012, 12:56 pm

    when tried this command yum list extras.Its showing as

    [root@localhost pavan]# yum list extras
    Loading “rhnplugin” plugin
    Loading “installonlyn” plugin
    This system is not registered with RHN.
    RHN support will be disabled.
    Setting up repositories
    http://apt.sw.be/redhat/el5Server/en/i386/dag/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
    Trying other mirror.
    Error: Cannot open/read repomd.xml file for repository: dag

    can i know the problem please

  • sowjanya November 2, 2012, 7:23 am

    yum install gnuchess
    Loaded plugins: aliases, changelog, downloadonly, kabi, presto, product-id, refresh-packagekit, security, subscription-manager,
    : tmprepo, verify, versionlock
    Updating certificate-based repositories.
    Loading support for Red Hat kernel ABI
    Setting up Install Process
    No package gnuchess available.
    Error: Nothing to do

    i am geeting this error working in distro it is showing wat to do

  • sandeep May 6, 2013, 1:12 pm


    Please help me on below error in RHEL.

    [root@localhost /]# yum update
    Gathering header information file(s) from server(s)
    Server: Red Hat Linux 4AS – x86_64 – Base
    retrygrab() failed for:
    Executing failover method
    failover: out of servers to try
    Error getting file http://mirror.dulug.duke.edu/pub/yum-repository/redhat/4AS/x86_64/headers/header.info
    [Errno 4] IOError:

  • shariq December 21, 2013, 11:12 am

    I am shariq
    I’m learning Linux and i have two users in my rhel6 root and redhat users.
    i want to give superuser power to redhat user, how to do it???

  • pawan May 29, 2014, 7:26 am

    I am using ‘Amazon Linux AMI release 2014.03’ micro instance. can anyone tell me, why extra packages not install on this machine after epel configured.

  • Raj November 10, 2014, 6:38 pm

    I need to download php5-cgi rpms for OEL . Where can i get it ?

  • Raghuvanshi August 29, 2015, 5:23 am

    please help for below Error:

    Server: Red Hat Linux 14 - i386 - Base retrygrab() failed for:   
     Executing failover method failover: out of servers to try
     Error getting file http://mirror.dulug.duke.edu/pub/yum-repository/redhat/14/i386/headers/header.info [Errno 4] IOError: 
  • adhip September 29, 2015, 7:08 pm

    i want to install packag(numpy) from net..
    but error is showing “no package avalaible”
    what to do?

  • ashutosh October 3, 2015, 4:20 pm

    how to make a SSL key and SSL certificate for activate rhel7
    buz without this activation i’m not able to configure yum

  • vijay March 14, 2016, 1:35 pm

    how to install yum packages in redhat Linux 7 for local repository

  • sayedmansoor June 16, 2016, 7:50 pm

    when I install want to install any package I see this message ” package not available ”
    and ” error : nothing to do ” please help me guys

Security: Are you a robot or human?

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">

   Tagged with: , , , , , , , , , , , , , , , , , , , ,