how to remove apt gets in ubuntu code example
Example 1: how to remove an apt repository
sudo add-apt-repository --remove ppa:whatever/ppa
# or
sudo apt-add-repository --remove 'deb some/repo your_distro main'
Example 2: apt-get uninstall
sudo apt-get --purge autoremove pkg
Example 3: apt uninstall
sudo apt-get remove [pkg]