All the guides I've seen recommend the use of the command dpkg --get-selections and redirecting the output to a text file.

Isn't there a file somewhere on the filesystem that contains a list of all installed software, including dependencies? A file that is updated every time the a package/dependency is installed.

  • Can I ask why using dpkg --get-selections isn't desirable? I just want to understand your situation better. – jessenorton Nov 24 '15 at 14:16
  • If I want to get access to the installed packages of one distribution while running another – TellMeWhy Nov 24 '15 at 15:40

Yes, there is a file. It is /var/lib/dpkg/status although this file is not going to be really useful if you want to get 'just' the list of installed packages. As you can see from the output below, this file has lot more information including dependencies, maintainer, version, architecture, etc.

ron@ron:~$ head /var/lib/dpkg/status
Package: fonts-sil-abyssinica
Status: install ok installed
Priority: optional
Section: fonts
Installed-Size: 2208
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: all
Multi-Arch: foreign
Version: 1.500-1
Replaces: ttf-sil-abyssinica (<< 1.200-1)
  • $ ls -tl /var/lib/dpkg/info/ | grep list > installed-packages.txt ... – Knud Larsen Nov 24 '15 at 18:34

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.