where is the list of installed packages kept?

Mitch Contla mcontla at gmail.com
Fri Jan 19 23:05:05 UTC 2007


stan said the following on 01/19/2007 12:24 PM:
> I'm rebuilding a machine, and I forget to get a list of the installed
> packages on the original one. I do howeverr have a tarball of the whole
> root filesystem on that machine.
>
> Where in that can I look for the list of installed .debs?
>
>   
A quick look at some Debian docs, and a poke around my system looks like
package information is contained in /var/lib/dpkg/status. Once you
un-tar the file, you could try something like:

$ cat /var/lib/dpkg/status | grep -B1 'ok installed' > selections

>From there you could use sed an create something that could be recovered
using:

$ sudo dpkg --set-selections < myselections
$ sudo apt-get -u dselect-upgrade

See the Debian Reference; specifically: 6.3.4 Recover package selection
data and 6.4.9 Record/copy system configuration.

Of course, others may know an easier way. Good Luck.

-- 
Mitch






More information about the ubuntu-users mailing list