I want to find a way to backup my system in the manner of storing a list installed packages. I want to be able to reproduce my setup for the case of a reinstall or automatically provision a VM with nearly the same software installed.

So I found out that its possible to export a list via dpkg by

dpkg --get-selections >/backup/package-selections

and than using it on target machine with

dpkg --set-selections </backup/package-selections
apt-get dselect-upgrade

Unfortunately this wont work since the list will also contain information of packages I dont want to (re-)install (e.g. kernel images which are already installed or driver for a Nvidia card but target machine has a ATI).

So now Im wondering if there is a smart way to filter the list or decide while exportin or later while importing between necessary packages or not or between low-level-/system-packages and tools or something.

Any Ideas?