Installing vs. Upgrading RPM

Installing vs. Upgrading RPM

What’s the difference between installing and upgrading an RPM? And what happens if you upgrade even though you haven’t installed first?

If you install an upgrade, typically what happens is that the software is now installed if it wasn’t there before.

For example, let’s say you don’t have foo installed.

If you installed via CLI like this:

rpm -ihv foo.rpm

… then you would have installed foo.

If you already had foo version 1.1 installed and you installed foo version 1.2 using CLI, you’d do this:

rpm -Uhv foo.rpm

… and you’ve now got foo 1.2 installed.

If you did not have foo installed at all and you installed foo 1.2 using CLI, you could do this:

rpm -Uhv foo.rpm

… and the system will realize that you don’t have foo installed and go ahead and install it for you. In that case, your ‘upgrade’ was really an ‘install’, since you were upgrading from nothing.

whoami
Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.