1

I want to recreate the list of installed packages I had in my 11.10 installation into my new 12.04 one. I updated to 12.04 at the same time I bought a new HD, so I can mount the old HD where the old 11.10 system was installed, read the list of installed packages in 11.10 somewhere, and do an apt-get install for each of them. How can I produce the list of installed packages from the mounted HD where my 11.10 was installed?

I can't run commands on the 11.10 system since I have already changed the HD, but if the list is somewhere in /var/cache/apt/archives I can look at the mounted HD, that would be the solution for me.

1
  • 1
    This is not a duplicate of the above question. This question asks how to get a list of a "mounted" drive not current running OS. This question must be answered using CHRoot not the method in the other question. Please re-open this question so I may answer it correctly.
    – jfreak53
    Aug 3, 2013 at 15:46

1 Answer 1

0

sudo dpkg --get-selections.

If you want these packages to be installed on 12.04, do the following

  1. On your 11.10

sudo dpkg --get-selections "*" > packages

  1. Transfer the file 'packages' to 12.04 and do

sudo apt-get update

sudo dpkg --set-selections < packages

sudo apt-get -u dselect-upgrade

You can refer to this : http://sosaysharis.wordpress.com/2012/05/02/upgrading-to-ubuntu-12-04-the-way-i-did-it/

2
  • I can't change the HD again. I would like to get that list from the mounted HD.
    – 719016
    May 5, 2012 at 16:14
  • Well your apt's cache will have quite a lot of the packages you have installed. But I'm not sure if that will have all of them. You can find it at /var/cache/apt/archives May 5, 2012 at 16:16

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