i know on desktop there's a graphical way to sync package list between pc.
on servers i've always been doing
dpkg --get-selection >pkg_list
scp pkg_list username@server:
dpkg --set-selction <pkg_list
apt-get update && apt-get upgrade
unfortunately this looks deprecated: i'm not anymore able to do that. is there any other way? (and without involving external tools like ansible, salt, puppet )
n.b. i don't want to sync configuration files or directory, just packages.
edit: added apt-get command to update/upgrade
sudo apt-get -u dselect-upgrade