I am trying to remove a repository in 12.04, like so
sudo add-apt-repository --remove ppa:cassou/emacs
sudo apt-get update
but when I run the command
ls /etc/apt/sources.list.d
I get the name of ppa mentioned in the list
cassou-emacs-precise.list
cassou-emacs-precise.list.save
Why so?
add-apt-repository --remove doesn't actually remove the repository but disables it. If you want to remove the repository along with any package it may have installed you can by using ppa-purge:
http://www.webupd8.org/2012/11/install-ppa-purge-with-multi-arch.html
NOTE: This will downgrade any packages you might have installed from the PPA to the version available in the main repositories. As explained in
man ppa-purge
:The repositories have been removed, if you check the contents of those files, you will find them empty. I don't know why they were not removed and I would call that a bug in
add-apt-repository
unless empty files are removed by default on reboot or similar.In any case, for future reference, you can always simply delete the files manually: