List installed packages in Ubuntu

I found this over at the Ubuntu Forums, but since it took me forever to find, I'm dropping notes here.

In RPM-based distros, you can do 'rpm -qa > somefile.txt'. In Debian/Ubuntu, do this:

dpkg --get-selections > machineA.txt

In true apt fashion, if you then want to have machine B have all the software machine A has, do this:

dpkg --set-selections 

Enjoy!

Comments

- Thanks for the info

Add new comment

Subscribe to SysAdmin's Journey RSS