This question already has an answer here:
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.