Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
2  
What are the contents of /etc/apt/sources.list.d/cassou-emacs-precise.list? The lines are probably commented out. You can also just delete the files manually by the way. –  terdon Mar 17 at 16:15
    
@terdon Ok, the file looks empty. But it was not deleted automatically. –  Gaurav Agarwal Mar 17 at 16:27

2 Answers 2

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:

sudo rm /etc/apt/sources.list.d/cassou-emacs-precise.list*
sudo apt-get update
share|improve this answer
    
It does not remove even after restart. Do we need to file a bug report on add-apt-repository? –  Gaurav Agarwal Mar 17 at 17:13
    
@terdon. Thanks –  Farooq Mar 17 at 17:34

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:

sudo ppa-purge ppa:cassou/emacs

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:

NAME
   ppa-purge - disables a PPA and reverts to official packages
share|improve this answer
    
ppa-purge does more than that it is - command line tool that downgrades all the packages installed from a PPA to the versions available in the official Ubuntu repositories. –  Gaurav Agarwal Mar 17 at 17:02
    
@GauravAgarwal surely that will only happen if the tools in question are available in both? –  terdon Mar 17 at 17:36
    
@terdon Yes, for the reason you mentioned, this cannot be considered the answer to the problem. –  Gaurav Agarwal Mar 17 at 18:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.