Ubuntu dpkg useful one liners

Just a little cheat sheet for dpkg

List files in package
$ dpkg -L remmina /. /usr /usr/share /usr/share/menu /usr/share/menu/remmina /usr/share/man /usr/share/man/man1 /usr/share/man/man1/remmina.1.gz /usr/share/doc /usr/share/doc/remmina /usr/share/doc/remmina/copyright /usr/share/doc/remmina/changelog.Debian.gz /usr/bin /usr/bin/remmina

See installed packages
$ dpkg --get-selections | head account-plugin-aim				install account-plugin-facebook				install account-plugin-flickr				install account-plugin-google				install account-plugin-icons				install account-plugin-identica				install account-plugin-jabber				install account-plugin-salut				install account-plugin-twitter				install

Install packages from machine A to machine B
(A) dpkg --get-selections > packages.txt

copy packages.txt to machine B

(B) dpkg --set-selections < packages.txt sudo apt-get -u dselect-upgrade