Newsgroups: comp.os.linux.misc,linux.debian.user
>How can I get a list of what packages are installed on my Debian?
dpkg -l
or:
dpkg --get-selections
(The former has more detail, the latter is machine-parseable.)
>Is there any way to use this list for my future installation?
dpkg --get-selections > selections [move to another computer] dpkg --set-selections < selections dselect install (or apt-get dselect-upgrade, same difference)
BTW, linux.debian.user is a newsgroup gatewayed from the debian-user mailing list (see http://lists.debian.org/). I'm not convinced that messages posted to the newsgroup make it to the mailing list; I've retained the crosspost just to see, but at any rate it probably won't behave the same way everywhere. If you want to ask debian-user something, best use the mailing list instead.
Colin Watson
> > dpkg --get-selections > > > >(The former has more detail, the latter is machine-parseable.) > >err, just what are you trying to do with the output of dpkg -l that you >can't do automatically?
Maybe I should have said "conveniently machine-parseable". Anyway, the output of 'dpkg -l' isn't really meant to be processed: if you want the installed version and short description for some reason, you're probably better off looking in /var/lib/dpkg/status yourself, which will be faster in any case.
Colin Watson