$ ssh remotehost 'dpkg --get-selections' | dpkg --set-selections && dselect install

(also works on Ubuntu) Copies the ‘install,’ ‘hold,’ ‘deinstall’ and ‘purge’ states of packages on the remote machine to be matched on the local machine. Note: if packages were installed on the local machine that were never installed on the remote machine, they will not be deinstalled by this operation.

commandlinefu.com

by David Winterbottom (codeinthehole.com)



Tags: