If you want to remove package completely in ubuntu you can use this command :
sudo apt-get purge –auto-remove packageName
for example :
sudo apt-get purge –auto-remove ssmtp
Reference :
https://askubuntu.com/questions/151941/how-can-you-completely-remove-a-package