SysAdmin's Journey

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 < machineA.txt && dselect