≡ Menu

up2date command to update Redhat enterprise Linux (RHEL) howto

Q. How do I use up2date command to update Redhat enterprise Linux server via RHN?

A. For Redhat enterprise Linux operating systems, you need to get updates from RHN via Redhat Network Satellite/proxy servers (usually used by big hosting/ISPs or larget RHEL installation setups) to install critical and non-critical security updates as well as binary packages.

Task: Register my system with RHN

To register your system with RHN type the following command and just follow on screen instructions:

# up2date --register

WARNING! These examples only works with RHEL version 2.x, 3.x and 4.x only. RHEL version 5.x comes with yum utility to update and install packages.

Task: Display list of updated software (security fix)

Type the following command at shell prompt:# up2date -l

Task: Patch up system by applying all updates

To download all update type the following command:# up2date -u

Task: Forcefully update or patching

Sometime you need to forcefully apply updates. By default RHN does not install new kernel, so you need to run updates using following command:# up2date -uf

Task: Install new software/rpm

Use up2date command to install new RPM from RHN:# up2date httpd

Task: Update installed software

To fix latest bugs or to apply a patch use up2date command as follows for php package:# up2date php

Task: Download source RPM files

Download source packages only but don’t install:# up2date -d --src Package-Name

Task: Display the list of available packages

# up2date --showall
# up2date --showall | grep httpd

Task: Install particular architecture package

If you are using 64 bit RHEL version it is possible to install 32 packages:# up2date --arch=i386 mysql

Above command will install mysql 32 bit version instead of 64 bit version.

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:# up2date --whatprovides "/etc/passwd"Output:


It queries the RHN servers to resolve the comma separated list of dependencies. It will return a list of packages that will satisfy these dependencies.

Task: Display list of group software

Option –show-groups displays all the component groups that are installable via up2date command. This is good to install entire set of software such as development environment.
# up2date --show-groupsOutput:

Administration Tools
Arabic Support
Assamese Support
Authoring and Publishing
GNOME Desktop Environment
GNOME Software Development
Games and Entertainment
Windows File Server
Workstation Common
X Software Development
X Window System

To install group X Software Development just type the command:
# up2date -i "@ X Software Development "

Read man page of up2date command for more information:
man up2date

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:

{ 14 comments… add one }
  • Bharat Yadav February 26, 2009, 3:11 pm

    did you have all list of command which we use in linux server for acess.

  • Larry March 28, 2009, 1:57 am

    Would you give an example output of up2date with the –dry-run option?

  • S.RAJARAM MOHAN March 31, 2009, 9:54 am

    Please give comphrehensive administrative commands to my mail ID

  • mouaz May 11, 2009, 3:19 pm

    this error
    -bash: /usr/bin/up2date: Permission denied
    what can i do

  • mouaz May 11, 2009, 10:44 pm

    Ok I’m as root

  • Viks March 1, 2010, 10:50 pm

    Can you tell me how can one achieve the below:

    Upgrade RHEL4 u4 to RHEL4 u8 using the packages which were downloaded using the up2date -d command.So,assuming I have downloaded all the available updates from U4 to U8 into a directory called /var/spool/packages ,how do I use those packages to perform the upgrade in a simple way?

    To my understanding,one has to install every package manually and there would be a dependancy hell doing that.Because,one is supposed to know what package precedes what or what is dependant on what.So,I really dont understand what is the use of the -d option that case.I am not talking about setting repositories here.

    • Anand Sharma May 11, 2010, 6:04 am

      You can give the following command:

      rpm -ivh /var/spool/packages/*

      This will automatically take care of the sequence of package installation.

  • pavankumar March 19, 2010, 11:38 am

    please send me useful linux commands

  • pavankumar March 19, 2010, 11:39 am

    give me an example of hw we do update in real time in linux rpm packages?

  • Jerome Benton March 3, 2011, 11:14 pm

    Is Perl 5 compatible with RedHat LINUX version 6?

    • nixCraft March 4, 2011, 9:50 am

      Yes, perl 5 is included with RHEL 6 as perl 6 is still not ready!

      • Jerome Benton March 4, 2011, 5:55 pm

        Thank you so much for that reply!

  • harif July 3, 2015, 10:22 am

    am try to register my rhel linux 6.4 server using subscription-manager cmd
    the system is registered but it shows the status as not subscribed and i not getting any updates from rhn can any one please suggest me on this

Leave a Comment

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

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