Skip to main content
replaced http://superuser.com/ with https://superuser.com/
Source Link

chroot into it, and run dpkg would be the easiest thing. See http://superuser.com/a/417004/20798https://superuser.com/a/417004/20798 for how to get a working /proc, /sys, and /dev inside the chroot.

Since you have a working debian system outside the backup, you could probably just use

dpkg --admindir=dir --get-selections 

The dir defaults to /var/lib/dpkg, so put the path to your backup's /var/lib/dpkg.


Don't forget that dpkg --get-selections doesn't show which packages were manually installed, and which were only installed to satisfy dependencies (and thus should be auto-removed when no longer needed because newer versions of the packages you actually want have different deps, or because you purge a manually installed package.)

I use aptitude, which makes it easy to mark everything as auto-installed, then go through and mark some packages as manually installed until nothing you want to keep is getting auto-removed. Start with big meta-packages, like build-essential, the Debian equivalents of ubuntu-standard and ubuntu-desktop, and stuff like that. In aptitude, hit r to see the reverse-depends of a package (pkgs that depend on it).

chroot into it, and run dpkg would be the easiest thing. See http://superuser.com/a/417004/20798 for how to get a working /proc, /sys, and /dev inside the chroot.

Since you have a working debian system outside the backup, you could probably just use

dpkg --admindir=dir --get-selections 

The dir defaults to /var/lib/dpkg, so put the path to your backup's /var/lib/dpkg.


Don't forget that dpkg --get-selections doesn't show which packages were manually installed, and which were only installed to satisfy dependencies (and thus should be auto-removed when no longer needed because newer versions of the packages you actually want have different deps, or because you purge a manually installed package.)

I use aptitude, which makes it easy to mark everything as auto-installed, then go through and mark some packages as manually installed until nothing you want to keep is getting auto-removed. Start with big meta-packages, like build-essential, the Debian equivalents of ubuntu-standard and ubuntu-desktop, and stuff like that. In aptitude, hit r to see the reverse-depends of a package (pkgs that depend on it).

chroot into it, and run dpkg would be the easiest thing. See https://superuser.com/a/417004/20798 for how to get a working /proc, /sys, and /dev inside the chroot.

Since you have a working debian system outside the backup, you could probably just use

dpkg --admindir=dir --get-selections 

The dir defaults to /var/lib/dpkg, so put the path to your backup's /var/lib/dpkg.


Don't forget that dpkg --get-selections doesn't show which packages were manually installed, and which were only installed to satisfy dependencies (and thus should be auto-removed when no longer needed because newer versions of the packages you actually want have different deps, or because you purge a manually installed package.)

I use aptitude, which makes it easy to mark everything as auto-installed, then go through and mark some packages as manually installed until nothing you want to keep is getting auto-removed. Start with big meta-packages, like build-essential, the Debian equivalents of ubuntu-standard and ubuntu-desktop, and stuff like that. In aptitude, hit r to see the reverse-depends of a package (pkgs that depend on it).

auto-installed state
Source Link
Peter Cordes
  • 6.7k
  • 24
  • 42

chroot into it, and run dpkg would be the easiest thing. See http://superuser.com/a/417004/20798 for how to get a working /proc, /sys, and /dev inside the chroot.

Since you have a working debian system outside the backup, you could probably just use

dpkg --admindir=dir --get-selections 

The dir defaults to /var/lib/dpkg, so put the path to your backup's /var/lib/dpkg.


Don't forget that dpkg --get-selections doesn't show which packages were manually installed, and which were only installed to satisfy dependencies (and thus should be auto-removed when no longer needed because newer versions of the packages you actually want have different deps, or because you purge a manually installed package.)

I use aptitude, which makes it easy to mark everything as auto-installed, then go through and mark some packages as manually installed until nothing you want to keep is getting auto-removed. Start with big meta-packages, like build-essential, the Debian equivalents of ubuntu-standard and ubuntu-desktop, and stuff like that. In aptitude, hit r to see the reverse-depends of a package (pkgs that depend on it).

chroot into it, and run dpkg would be the easiest thing. See http://superuser.com/a/417004/20798 for how to get a working /proc, /sys, and /dev inside the chroot.

Since you have a working debian system outside the backup, you could probably just use

dpkg --admindir=dir --get-selections 

The dir defaults to /var/lib/dpkg, so put the path to your backup's /var/lib/dpkg.

chroot into it, and run dpkg would be the easiest thing. See http://superuser.com/a/417004/20798 for how to get a working /proc, /sys, and /dev inside the chroot.

Since you have a working debian system outside the backup, you could probably just use

dpkg --admindir=dir --get-selections 

The dir defaults to /var/lib/dpkg, so put the path to your backup's /var/lib/dpkg.


Don't forget that dpkg --get-selections doesn't show which packages were manually installed, and which were only installed to satisfy dependencies (and thus should be auto-removed when no longer needed because newer versions of the packages you actually want have different deps, or because you purge a manually installed package.)

I use aptitude, which makes it easy to mark everything as auto-installed, then go through and mark some packages as manually installed until nothing you want to keep is getting auto-removed. Start with big meta-packages, like build-essential, the Debian equivalents of ubuntu-standard and ubuntu-desktop, and stuff like that. In aptitude, hit r to see the reverse-depends of a package (pkgs that depend on it).

Source Link
Peter Cordes
  • 6.7k
  • 24
  • 42

chroot into it, and run dpkg would be the easiest thing. See http://superuser.com/a/417004/20798 for how to get a working /proc, /sys, and /dev inside the chroot.

Since you have a working debian system outside the backup, you could probably just use

dpkg --admindir=dir --get-selections 

The dir defaults to /var/lib/dpkg, so put the path to your backup's /var/lib/dpkg.