-   Debian (
-   -   [aptitude] How to get a list of all installed packages? (

coralsaw 06-25-2006 08:06 AM

[aptitude] How to get a list of all installed packages?

I use aptitude for package management. Having already browsed through the forum, google, and aptitude manual, I haven't found a way to list all packages that are installed in the system on purpose (and not been dragged in automatically). I know aptitude maintains a "markauto" list but haven't been able to found out where.

I would use such a list to eg. create a mirror system in terms of intalled packages should the current one fails.

Of couse I could use dpkg --list to see all installed packages, but then I wouldn't remember what was installed automatically and what on purpose.

Any ideas please? Thanks in advance.


DeanLinkous 06-25-2006 11:14 AM

create a mirror of installed packages? use apt-move

farslayer 06-26-2006 08:47 AM

so you don't want to use the old standby which would create a list of everything on the system so you could easily setup another machine with all the same packages using the set-selectios switch.. ?

Backup installed package list on current machine
dpkg --get-selections > selections.txt

move selections.txt to the new machine Set package list on new machine and install packages
dpkg --set-selections < selections.txt
apt-get update
apt-get upgrade

If that's not what you are looking to do I'm a bit confused on what your actual goal is..

Wether a package was installed by the system or you isn't all that important..
if you want the systems to be identical you will still need all the installed packages.

coralsaw 06-27-2006 02:33 AM

Thank you both for your replies.

It's important to me to know what packages I have selected and not what the system dragged in as dependencies, because perhaps dependencies will change in the future while those obsolete packages are left behind.

This is, IMO, why aptitude is better than apt-get, because it remembers markauto/unmarkauto selections. I know the information is there, I just don't know how to get it out.

Or perhaps I'm confused?

Thanks again, appreciate any further ideas.


Dead Parrot 06-27-2006 12:30 PM


aptitude search '~i'
The above command will list all your installed packages and the automatically installed ones will be marked with A.

For additional info, check out "aptitude user's manual" (especially the section "Search Patterns"):

coralsaw 06-30-2006 08:05 PM

Thank you Dead Parrot! Exactly what I was looking for.


All times are GMT -5. The time now is 07:03 PM.