Amar Patil
Amar Patil

Reputation: 75

How to upgrade RPM with rollback option enabled on centos?

I am using rpm for installing my application on centos. So to upgrade same rpm on centos I am planning to use "rpm -Uvh " command.

Does this command support inbuild rollback ? I mean if my upgrade fails then how can i do the rollback ?

Upvotes: 1

Views: 186

Answers (1)

msuchy
msuchy

Reputation: 5427

AFAIK rpm --rollback and --repackage was removed from rpm around RHEL6 (maybe even in RHEL5). So recent OS does not support transaction by using only rpm command. The rpm itself now does not support transaction. It is left for tools built on top of rpm: Yum and DNF.

So on Centos you can run:

yum upgrade foo.rpm bar.rpm

and

yum history undo last

to rollback last transaction.

Upvotes: 1

Related Questions