A command line tool which lists the licenses of all installed packages in a Debian-based system (like Ubuntu)
~#cd dpkg-licenses
~/dpkg-licenses# bash ./dpkg-licenses.sh >output.txt 2>error.txt
$ cat output.txt | cut -c135- | wc -l
2230
$ cat output.txt | cut -c135- | grep unknown | wc -l
228