apt get a list of all installed packages

Do this:

dpkg --get-selections | grep -v deinstall