Better use sudo dpkg --get-selections