Dpkg-sync is a project mainly written in ..., it's free.
Sync installed packages between Debian/Ubuntu hosts
Cross-host comparison and eventually syncing of installed packages on Debian/Ubuntu hosts.