I use this:
from lovinglinux - use dpkg to list installed apps
From old install
dpkg --get-selections > ~/my-packages
From New install
sudo dpkg --set-selections < my-packages
sudo apt-get -y update
sudo apt-get dselect-upgrade
But I have two scripts as I have other partitions I want to re-add to fstab, and some system files I edit. Then I install my applications. Some I have hardcoded, then then they are duplicated in my update from dpkg list. If installing a new version of Ubuntu you do have to check that you do not install older apps like OpenOffice when LibreOffice is now the standard as you do not need both.
From my script where ubuntu-files is text list of apps.
apt-get install dselect
# Finally, install all the packages from previous install
# must have saved ubuntu-files from previous install to this directory
dpkg --set-selections < ubuntu-files
apt-get -y update