how to delete using apt code example
Example 1: apt remove
sudo apt-get --purge autoremove packagename
Example 2: apt uninstall
sudo apt-get remove [pkg]
sudo apt-get --purge autoremove packagename
sudo apt-get remove [pkg]