LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-11-2011, 11:29 PM   #1
veeruhs
LQ Newbie
 
Registered: Feb 2010
Posts: 17

Rep: Reputation: 0
Package upgrade and update


Hi,

Can anybody pls tell me the difference between upgrading a package using rpm -U command and updating it using yum update packagename.

Thanks in advance
Veerendra
 
Old 04-12-2011, 12:05 AM   #2
Walter.Stroebel
LQ Newbie
 
Registered: Apr 2011
Location: Arnhem, The Netherlands
Distribution: CentOS
Posts: 19

Rep: Reputation: 6
In the first case you need to download the *RIGHT* package by hand and in the second case yum will find and download the proper package for your distribution.

If yum does not have the package you need to either add a a repository in /etc/yum.repo.d, the site your package is at will tell you how to do this (eg. webmin, rpmforge, opsview, and so on) or you can download a some_package.rpm file and use

yum localinstall some_package.rpm

It is generally not a good idea to use rpm directly on a yum-based system.

Happy installing,
Walter.
 
Old 04-12-2011, 12:59 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,374

Rep: Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383
The main difference is that rpm does not handle dependencies. yum is a layer over the top (ie individual pkgs/files are in rpm format) that will automatically handle dependencies.
http://kbase.redhat.com/faq/docs/DOC-2531
 
1 members found this post helpful.
Old 04-12-2011, 07:31 AM   #4
veeruhs
LQ Newbie
 
Registered: Feb 2010
Posts: 17

Original Poster
Rep: Reputation: 0
When yum update packagename is run does it uninstall older version of package and install a new version?
 
Old 04-12-2011, 07:55 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,374

Rep: Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383
See here http://www.linuxtopia.org/online_boo...on/index.html; Chaps 10, 11 (& 12) for the full explanation.
 
Old 04-12-2011, 11:37 PM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,684

Rep: Reputation: 3286Reputation: 3286Reputation: 3286Reputation: 3286Reputation: 3286Reputation: 3286Reputation: 3286Reputation: 3286Reputation: 3286Reputation: 3286Reputation: 3286
# 5
This link works http://www.linuxtopia.org/online_boo...ion/index.html


# 4
AFAIK, yum uses 'rpm -Uvh <package>' to install packages.
 
Old 04-13-2011, 12:36 AM   #7
veeruhs
LQ Newbie
 
Registered: Feb 2010
Posts: 17

Original Poster
Rep: Reputation: 0
Hi

Consider I have sendmail package installed on my linux server.

what is effect of running rpm -U sendmail..does it uninstall the current version of sendmail installed and delete all conf files of sendmail and install new version of sendmail.

Also what is the effect of running yum update sendmail

Cheers
Veerendra
 
Old 04-13-2011, 06:11 AM   #8
johntaw
LQ Newbie
 
Registered: Mar 2011
Location: Stockholm/Sweden
Distribution: Centos 5.5, Debian, Fedora, Mandriva
Posts: 6
Blog Entries: 1

Rep: Reputation: 1
You can use yum update sendmail or rpm: The -U option with rpm will upgrade an existing package or install the package if it is not already installed, this way, uninstalled
packages are installed, while installed packages are upgraded. The -F option will only upgrade or freshen a package that is already installed. Config files should not be affected.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Synaptic package manager error when trying to upgrade & update MACD2010 Linux - Newbie 2 01-26-2010 05:40 AM
Slackware security update/package update Michael_aust Slackware 6 10-04-2006 08:19 PM
Will 'aptitude upgrade or dist-upgrade' downgrade manually installed deb package? Akhran Debian 3 03-14-2006 02:40 PM
Does apt-get install <package> upgrade the package if it is already installed? davidas Debian 4 04-05-2004 06:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration