Use this command to see if a package is already installed:
apt list --installed | grep -i xyz
Reference
https://askubuntu.com/questions/17823/how-to-list-all-installed-packages
Use this command to see if a package is already installed:
apt list --installed | grep -i xyz
https://askubuntu.com/questions/17823/how-to-list-all-installed-packages