3

My motherboard suddenly died, but it was an old machine(running natty). So I put together a new Ubuntu system with a clean 14.04 install (same username) and mounted the old drive (with the full filesystem) as secondary device.

How can I get a full list of software installed on the old machine, from its disk mounted on the new one?

  • Sure, mount the hard drive, chroot into the system, and use dpkg --get-selections. – Faheem Mitha Sep 24 '14 at 17:05
2

Mount the old drive, e.g. under /mnt/old and then do:

 dpkg --root-dir /mnt/old --get-selections | grep -F ' install' ' | cut -f 1

dpkg has facilities built-in to install/list/de-install on a filesystem not based directly under /.

  • syntax was a bit different on my case, but this is the right way. Thanks – newbie Sep 25 '14 at 17:59
0

You have to boot via a linux Live, Then chroot to old linux, then:

dpkg -l "*" |grep ^ii |awk {'print $2'}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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