How to migrate YUM packages to new server

package-managementyum

I moved to a new server and I want to move all the packages I installed through YUM on the old server to the new one. Also I will need to move the repositories with this. How can I do that? I looked online and I'm not finding this anywhere.

Best Answer

I'd start such a script by copying the contents of /etc/yum.repos.d/ and /etc/pki/rpm-gpg/ to the new system and install the packages listed when running yum list installed on the original system.