LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
LinkBack Search this Thread
Old 11-17-2004, 09:17 PM   #1
Eklipz
Member
 
Registered: Sep 2004
Posts: 85

Rep: Reputation: 15
rpm -ivh vs. rpm -Uvh


Im wondering if someone could explain to me when I should use each of these different commands to install new RPMs. I have read some places that use -ivh, and some that use -Uvh, but I am not sure how to determine on my own which should be used at what time.
 
Old 11-17-2004, 09:28 PM   #2
noxious
Member
 
Registered: May 2004
Location: Ohio, USA
Distribution: LinuxMint Gloria, Ubuntu 9.10
Posts: 299

Rep: Reputation: 30
Excellent question... I have the same one, actually. They both seem to work the same...
 
Old 11-17-2004, 09:35 PM   #3
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 56
I use rpm -Uvh < package.rpm> myself. The U gets rid of old stuff but other than that, it's mostly just personal preference.

This is from ( man rpm )

rpm {-U|--upgrade} [install-options] PACKAGE_FILE ...

This upgrades or installs the package currently installed to a newer
version. This is the same as install, except all other version(s) of
the package are removed after the new package is installed.
 
Old 11-18-2004, 12:45 AM   #4
{-_-}
LQ Newbie
 
Registered: Jul 2004
Location: Houston, Tx
Distribution: SUSE 9.0 Professional
Posts: 17

Rep: Reputation: 0
-U is used for upgrade, and -i is used for install. I recommend using -i for installing AND upgrading whenever possible since -U will overwrite certian config files depending on whoever packaged the rpm.
 
Old 11-18-2004, 03:27 AM   #5
Boby
Member
 
Registered: Feb 2004
Location: Sighisoara/Cluj-Napoca (Romania)
Distribution: CentOS 4, Fedora Core 6
Posts: 781

Rep: Reputation: 31
You can use
Code:
rpm -Uhv package.rpm
for installing too. If it doesn't find an older package on your system it will just install it like
Code:
rpm -ihv package.rpm
Boby
 
Old 12-01-2013, 10:21 PM   #6
hoylen
LQ Newbie
 
Registered: Dec 2013
Posts: 1

Rep: Reputation: Disabled
Update and install are different

Update (-U) is different install (-i) if the package was previously installed: especially if some of the files have been modified. Update will attempt to preserve your modifications, whereas install will remove all traces of any modifications you might have made.

If the current contents of the file is different from both that what was originally installed and what is in the update package, and the file in the update package is also different from that originally installed, the current contents are saved to a file with .rpmsave extension before replacing it with the file from the update package.

If there was no file in the originally installed package, the current file is renamed with the .rpmorig extension before replacing it with the file from the update package.

If using update, you are responsible for manually processing any .rpmsave or .rpmorig files that are created.

This handling of modifications is in addition to the other difference: update removes the old package (if there was one), but install does not (requiring manual use of uninstall (-e) if you want to get rid of the other versions).

Last edited by hoylen; 12-01-2013 at 10:34 PM. Reason: Made answer more complete by describing removal.
 
Old 12-02-2013, 01:51 AM   #7
John VV
Guru
 
Registered: Aug 2005
Posts: 12,112

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
hoylen
i take it you are not aware that this thread is from 2004 ( 9 years ago )

Also on Fedora yum should be used
use rpm as a last resort and for a few specific things like "Libre Office 4"
but even then using -localinstall option in yum is preferred
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
after rpm -ivh then what brucewayne3210 Linux - Software 2 05-26-2004 07:24 PM
rpm -Uvh does not work with header & rpm files in /var/spool/up2date jd_no7 Linux - Software 1 05-17-2004 05:24 PM
path for directory while doing rpm -ivh newbielinux Linux - Newbie 0 02-27-2004 08:47 AM
rpm -Uvh or -ivh? chri5 Linux - Newbie 1 11-16-2003 12:59 PM
rpm -Uvh apache.... fail and shutdown q jefftrwmy Linux - Software 2 04-18-2002 07:22 PM


All times are GMT -5. The time now is 12:11 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration