Thank you very much. I used grep to filter out the deinstalled packages. Here's the line that worked.
dpkg --get-selections | grep -w install | cut -f1 | / xargs apt-get --reinstall -y install Nikolai. -- |- Escape the -| | Gates of hell. | Debian GNU/Linux | | http://www.debian.org |- Use Linux. -|