-   Linux - Newbie (
-   -   Listing of packages installed on system (

borgibo 05-14-2008 02:10 PM

Listing of packages installed on system
Newbie woes,:confused:

If it is possible to refer to a former thread's reply, here it is:

Listing of packages installed on system

I know that the command to get the list of all the packages installed on your system is
#dpkg -l

But the thing is when it shows me the list of packages it marks soem of them 'rc' or 'pi' i.e. means those packages are not there on my system..right? So if those packages are not there why does it still shows them in the list.

Is there any command by which I can get only the packages that are installed on my system?

Here is the output of the dpkg -l command:


The above thread is by kushalkoolwal of 04-28-06.

The first answer to that thread is the following for which I need some clarification, as it is exactly what I need:

I've used dpkg --get-selections > selections.txt to output everything installed on my system to a text file.

The thing I like about this command is that I can output it to a text file and then install all the same programs on a different machine with

apt-get update
dselect update
dpkg --set-selections < selections.txt
apt-get dselect-upgrade

Then I just have to copy over the appropriate config files from /etc and I'm all set with a cloned system, even if the hardware is different.

By pljvaldez Senior Member

Registered: Dec 2005
Location: Pasco, WA
Distribution: Debian Etch and AMD64 Sid
Posts: 4,508

Here are my questions in case they might be answered by somebody:

a.I did "dpkg --get-selections >selections.txt" and all my installed packages appeared in a file as "selections.txt " which I discovered in
/home/jv, jv being the user i.e. me.

As I understand, with my scant computer knowledge, this "selections.txt " document I must transfer to the new to be cloned distro.That means I will have to copy it somewhere so that the distro will be able to access it and install all the programs therein. Do I send/copy it to /home/jv as well? jv is the user at the new distro as well.

b. "Then I just have to copy over the appropriate config files from /etc and I'm all set with a cloned system, even if the hardware is different."

What are the "appropriate conf files "? I found one that might be the one reffered to, in /etc/dpkg/dpkg.conf. It reads thus:

# dpkg configuration file
# This file can contain default options for dpkg. All command-line
# options are allowed. Values can be specified by putting them after
# the option, separated by whitespace and/or an `=' sign.

# Log status changes and actions to a file.
log /var/log/dpkg.log

Sorry but I am quite lost.:cry:

You see I want to change my mobo and since from my experience I do not expect to be able to boot any more I thought of getting a new hhd, copying the /home partition to the new hdd, reinstalling the distro to its /root partition and transferring the programs, as I do not remember all the extra applications I have in the meantime installed.The distro works perfectly,
it is 64Studio 64bit, based on debian etch. The only reason is to make the system quiter by reducing the fan speed, presently at about 1500rpm.,
to about 750rpm using an Asus mobo with Q-fan.

Thank you for your attention,


biophysics 05-14-2008 02:24 PM

This explains it all very well. Alternatively, you can use APToncd to create a local disk with all your packages to make reinstall easier.

Well, if you do not change the architecture of motherboard, I think it should be OK to replace it. YMMV.

borgibo 05-15-2008 07:41 AM


Thank you very much for the information and link. Having chequed 'man dpkg' also, I got the required information at the end of the page. The important thing is to leave a space before ">" and "<" .

As for the "selections.txt" file, of course it is going to be there in the to be cloned distro, since it resides in /home which will be transferred to the new hdd anyway.

Aptoncd is also of great interest and very useful.

I will try the transfer in the next days and will let you know.

Thanks again,


farslayer 05-15-2008 07:45 AM

doesn't really matter the location of the selections.txt file.. you can use a Flash drive to transfer it if you want. as long as you point at that file when you do set-selections it will work just fine.

borgibo 06-16-2008 03:42 PM

It has been over a month now since I first tried to move over from one mobo to another, quieter,as I explained in my original post. Unfortunately the first mobo I tried did not work very well, i.e. in my multiboot system either xorg or my sound card, a M-audio audiophile 24/96,would not connect,in one or more distro, so I tried a second motherboard, alas with similar results!

I decided to reinstall the original one that was a bit loud, only to find out that it would not work at all, would not boot! Being a computer newbie but insisting, stubborn I would call myself,went over googling and wikipediaing to find out that its bios got for some inexplicable reason corrupted. It was perfect until I replaced it.

I used all means to repair it, as per instructions, or "flash" the bios after downloading the latest software from the mobo's manufacturer to no avail, so I had to give it over for repair.It has been used for 10 months and is under guaranty.

But trying a fourth mobo ! I succeeded in having my distros functioning again and QUIET !

That was a real saga for me but I have learned a lot, the hard way.

That said I am really very very happy to inform you that I went as root "dpkg --get-selections >selections.txt", which was
coppied in /home user.

Then I coppied-pasted /home to a new hard disk drive.

Installed the same distro at the new hdd in root partition keeping as /home the newly coppied-pasted one,

As root in a terminal I printed:

"apt-get update
dselect update
dpkg --set-selections <selections.txt
apt-get deselect-upgrade"

and all the applications I had were downloaded and installed promtly, NO ERRORS , taking a disc space of approximately 1GIB
for each, Debian etch and 64Studio2. That I did for at least two times for each distro, I think a total of 5 times or more.

Considering the multible mobo changes.

I am writing this while listening to beautiful music with 64Studio :-)

A great thank you to everybody. Wonderful to know that people are willing to spend their time to teach and help.



All times are GMT -5. The time now is 04:29 PM.