1

I have 2 machines with Centos 7.5 on them. one of them is virtual and the other one is physical. There are some rpm packages on virtual one that were installed by rpm command. I need to know what those packages were but there are so many packages and I have no idea which one I will need.

the problem is that I need those packages to be installed on physical one too. my question is that is there anyway to extract rpm packages from virtual one and import them into physical one?

It is really time consuming to download each one from websites and then install them. we had these rpm files before but it seems they are missing. and also I can not use yum on both servers at all.

1 Answer 1

1

my question is that is there anyway to extract rpm packages from virtual one and import them into physical one?

Once installed the RPM package info gets written to the RPMDB database in /var/lib/rpm and files get extracted. There's no easy way to revert the process, though it's possible.

I need to know what those packages were but there are so many packages and I have no idea which one I will need.

Run

yum list installed

to see what's installed. You can then filter all the standard packages using e.g.

yum list installed | egrep -v "@base|@updates|@anaconda|@update"

You can also use yum history to get this info.

2
  • can i sort packages in that command by time they were installed? like a group by in database. Commented Oct 27, 2020 at 11:35
  • 2
    rpm -qa --last Commented Oct 27, 2020 at 11:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .