# backup the sources.list file ! # backup apt-mark showmanual > .installed_ubuntu_packages # on another system # restore sources.list file ! xargs < .installed_ubuntu_packages apt-get install -y รค old school way # backup the sources.list file ! dpkg --get-selections > .installed_ubuntu_packages # on a new system # restore sources.list file ! dpkg --clear-selections sudo dpkg --set-selections < list.txt