How can you update a package only if an earlier version is currently installed on the system?

How can you update a package only if an earlier version is currently installed on the system?

How can you update a package only if an earlier version is currently installed on the system?

A.
rpm –update rpmname

B.
rpm -U rpmname

C.
rpm -F rpmname

D.
rpm –force rpmname

E.
rpm -u rpmname

Explanation/Reference:
rpm -F, –freshen <package>
updates <package>, but only if the package is currently installed.
rpm -U, –upgrade <package>
updates <package> regardless if the package is installed or not.
–force only works in combination with installing or upgrading. -u is an invalid option, as is –update



Leave a Reply 2

Your email address will not be published. Required fields are marked *


shuno

shuno

I think B is also answer.

liliiao

liliiao

B will always update a package – regardless if it is installed or not
Only C option is valid, as it updates only if earlier version is installed