Can I copy an RPM from one machine to another?

Hello there,

I have an RPM installed on a Fedora 8 Linux machine which was installed via yum. That version of the RPM is no longer available in the repo, instead there is a newer beta version. Can I copy an RPM from one machine to another Linux machine and install it there? If not, how do I save an RPM (for future use) before installing it?

I did do several searches, both here and in Google, but I have been unable to find any documentation.

Thank you for any help you can offer!

Yes, but whether it works or not is a different matter. Binary incompatabilities, 32-bit v 64-bit, changes in dependancies, etc.

Thank you for the response, fpmurphy. Regardless of the compatibility, how do I copy it? I read the man pages for rpm and I tried to find the RPM by name, but I cannot locate the RPM in order to copy it. Is there an rpm flag for copying or installing to another machine?

Thanks,
vera

You'd copy them the same way as any other file. But as soon as an RPM is installed, it's not needed anymore , not even for an upgrade. So most distributions regularly purge the cache for RPMs to save space, and only the repository management software needs to know where to get it again.

If you need the RPM itself, and didn't download it manually, check the installation media of your distribution.

OK, looks like this is the reason I cannot find the RPM anywhere and the cache is empty. I did not download it manually, I installed it from the repo via yum as mentioned in my OP.

So the answer to my question is: No, an RPM that was installed from the repo via yum on one machine cannot be copied to another machine. I need to download the RPM itself in order to copy it.

Thanks for the help, pludi.

If you want yum to keep a copy of the rpms it downloads set keepcache to 1 in yum.conf.

Aha, that is the solution!

Thank you, fpmurphy!

~vera