[aptitude] How to get a list of all installed packages?
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
[aptitude] How to get a list of all installed packages?
Hello,
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.