Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
Duplicate of askubuntu.com/questions/129182/… – harisibrahimkv May 5 '12 at 16:10

1 Answer

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/

share|improve this answer
I can't change the HD again. I would like to get that list from the mounted HD. – 213441265152351 May 5 '12 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 – harisibrahimkv May 5 '12 at 16:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.