7

I have a backup of my Ubuntu computer stored on my iMac. My hard disk died and I want get a list of the packages that was installed by just reading from the file system and without running commands like dpkg --get-selections

2
  • What's wrong with dkpg --get-selections?
    – zondo
    Apr 5, 2017 at 16:39
  • I do not have shell access to the machine, because my machine is broken and I just have the file system.
    – tjespe
    Apr 5, 2017 at 16:40

2 Answers 2

11

You can do it by reading /var/lib/dpkg/status from your backup.

In my running Ubuntu:

grep '^Package:' /var/lib/dpkg/status | cut -f2 -d' '
1
  • Nice edit, I was about to point you here
    – Elder Geek
    Apr 5, 2017 at 16:50
3

grep "Package" /var/lib/dpkg/status > Package.list should do the trick

You must log in to answer this question.

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