Debian: Installed package list

Debian: Installed package list

Post by * Tong » Sun, 27 May 2001 05:11:45



Hi,

How can I get a list of what packages are installed on my Debian? Is
there any way to use this list for my future installation? thanks

--
Tong (remove underscore(s) to reply)
  *niX Power Tools Project: http://xpt.sourceforge.net/
  http://members.xoom.com/suntong001/
  - All free contribution & collection

 
 
 

Debian: Installed package list

Post by Colin Wats » Sun, 27 May 2001 05:45:24



Quote:>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.)

Quote:>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.

Cheers,

--

"I see people didn't read the smiley I didn't include."

 
 
 

Debian: Installed package list

Post by * Tong » Sun, 27 May 2001 06:34:12


thanks Colin, you've always been very helpful.

--
Tong (remove underscore(s) to reply)
  *niX Power Tools Project: http://xpt.sourceforge.net/
  http://members.xoom.com/suntong001/
  - All free contribution & collection

 
 
 

Debian: Installed package list

Post by SammyTheSna » Sun, 27 May 2001 22:09:02




>>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.)

err, just what are you trying to do with the output of dpkg -l that you
can't do automatically?

Cheers & God bless
SammyTheSnake
--

Linux, Hardware & Juggling specialist :-) | job, if you can help, e-mail me :)
Wheels: bike, 'ickle bike, and unicycle.  | /o \/ Working on 5 ball 1/2 shower

 
 
 

Debian: Installed package list

Post by Michael Per » Mon, 28 May 2001 10:48:45





>>>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.)

> err, just what are you trying to do with the output of dpkg -l that you
> can't do automatically?

> Cheers & God bless
> SammyTheSnake
> --

> Linux, Hardware & Juggling specialist :-) | job, if you can help, e-mail me :)
> Wheels: bike, 'ickle bike, and unicycle.  | /o \/ Working on 5 ball 1/2 shower


I use this kind of output at work often since we do a variety of linux
builds and its nice to compare or diff the differences in installs.  We
do the same thing with redhat installations on occasion.  We just export the
installed rpms to a text file and then compare them.  Once you get things in
a text file, you can use some pretty neat tools to look at patterns of the
installations, etc.

The other tool I tend to use these days personally is one of the console-apt
programs like aptitude.

--
Michael Perry

--------------------

 
 
 

Debian: Installed package list

Post by Colin Wats » Mon, 28 May 2001 11:13:58





>>>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.)

>err, just what are you trying to do with the output of dpkg -l that you
>can't do automatically?

(a) Feed it to dpkg --set-selections (well, possible, but fiddly);

(b) Not have reasonably-sized package names truncated (you can "fix"
    this by setting COLUMNS, but it's ugly).

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.

--

"Microsoft deprived consumers of software innovation that they very
 well may have found valuable." - USA vs. MS findings, para. 410