Get list of the installed packages from debian distributions for documentation

When documenting my server installation I needed to have a list of packages installed on my server. dpkg –get-selections is great help but it returns values/packages each on separate line including “installed” keyword. This command returns list of installed packages in the single block separated with single space:
dpkg –get-selections | awk ‘{ print $1; }’| [...]