Ask Your Question
3

Install packages installed in old installation in fresh installation easily

asked 2012-02-19 12:24:53 -0500

phoxis gravatar image

updated 2012-02-19 12:39:44 -0500

I am using fedora 15 32 bit. I need to install a 64 bit of 16 or 15 for some cause, but i have a lot of additional packages installed in the current system. What i want is to somehow get all the installed package lists, then make a fresh install of the newer version, and then use the package list from the older installation to fetch those packages for the newly installed version. How can i do this. I have no manual log of the additional packages i have installed.

The solution what i have thought is to yum list the installed packages and then cut out the package name portion and store this list. Later after new installation pass this list into yum param which will automatically install the already not installed components. Like:

yum list installed | tail -n+3 | cut -d' ' -f1 | cut -d'.' -f1 | tr '\n' ' ' > yum_update_pack_list

Then i can use the yum_update_pack_list to install the packages, after enabling all the required repos.

Any issues that i may face with this solution, or is there any easier path?

Also it would be great if i could automatically restore the configurations. I have a separate /home and / mountpoints.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
6

answered 2012-02-20 08:03:55 -0500

Remi gravatar image

Filtering yum or rpm output seems a bit uggly... when RPM offer an option to choose output format ;)

rpm -qa --qf "%{NAME}\n"
edit flag offensive delete link more
3

answered 2012-02-19 15:09:13 -0500

ztank1013 gravatar image

Since you are going from a 32 to 64 bits what really matters are package (RPMs) names, without additional info such as x86, i386, noarch, etc.

The rpm command come in handy but the output needs a little cleanup.

I would run something like this:

rpm -qai | grep "^Name        :" | awk '{print $3}' | xargs > rpm_update_pkgs_list

The xargs will print the awk manupulated output in one line with all the packages separated by blanks.

Then to restore all the packages in your brand new 64 bits fedora 16 system just run the following:

sudo yum install $(cat rpm_update_pkgs_list)
edit flag offensive delete link more
1

answered 2012-02-19 13:26:02 -0500

Peter Scott gravatar image

I haven't used it myself but I think you should look at kickstart.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-02-19 12:24:53 -0500

Seen: 2,893 times

Last updated: Feb 20 '12