Difference in 'RPM -Fvh' and 'RPM -Uvh'

LuckyTaxi

Diamond Member
Dec 24, 2000
6,044
23
81
I've been updating my packages using 'rpm -Uvh' for quite some time, and then someone's
instruction told me to use 'rpm -Fvh' to update this theme I was trying to update. Which
syntax is the correct way? I know the 'F' stands for freshen and the 'U' stands for upgrade,
but why the two?
 

TonyRic

Golden Member
Nov 4, 1999
1,972
0
71
Quoted from http://www.security-express.com/archives/bugtraq/2000-01/0049.html


[1] Since at least version 2.5.3, the Red Hat 'rpm' tool --which has been
used by non-Red Hat Linux distributions like Caldera and SuSE also--
provides an install option called --freshen (-F) which is preferred for
upgrading packages. "freshen" will only install the newer package if an
earlier version of that same package is already installed, whereas -U
(--upgrade) will install the new .rpm package _regardless_ of whether you
have an earlier version installed.


 

manly

Lifer
Jan 25, 2000
12,916
3,687
136
Freshen is sweet. As a simple example, KDE 3.0.2 packages were recently released for SuSE Linux. I mirrored (most of) the tree, which resembles:

kde/update/base
kde/update/applications
kde/update/development

To update KDE, all you have to do is:

rpm -Fvh kde/update/base/*.rpm kde/update/applications/*.rpm kde/update/development/*.rpm

It doesn't matter exactly which packages you downloaded as long as you have the whole tree. Freshen will only upgrade a package if you already have it installed. While this still requires more user intervention than apt-get, for me it gets the job done fairly conveniently. I would use Yast Online Update (YOU), SuSE's version of Red Hat up2date, but it really sucks.

As a side note, rpm automagically orders the package installation accordingly. I can't recall how many times people ask/state that they had to painstakingly install packages one by one in a particular order because rpm is sh1tty, when that isn't the case at all.