How to reinstall rpm package?

Newbie picture Newbie · May 25, 2011 · Viewed 81.9k times · Source

I have installed a package from .rpm file and it is stored in /opt.

After some configuration I found that I need to reinstall the software. So I deleted the directory and attempted to reinstall the file with rpm -i XXX.rpm. But it tells me that package xxx is already installed.

How can I reinstall it?

Answer

sarnold picture sarnold · May 25, 2011

Try: rpm -iv --replacepkgs <packagefile>.

More details are in the book.