32

This question already has an answer here:

I would like to run the reverse of this command to remove the non-compatible repository in Debian 8.1

sudo add-apt-repository -y ppa:nemh/systemback

where the command add-apt-repository is in the package software-properties-common. I could not find the systemback entry in /etc/apt/sources.list.

How can you run the reverse of the command?

marked as duplicate by G-Man, yaegashi, cuonglm, hildred, Michael Homer Jul 31 '15 at 5:23

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

55

To remove a repository, you have to do 2 things:

  • Remove it from sources.list.

    If it was added by add-apt-repository then you will find it in its own file in /etc/apt/sources.list.d, not in the main sources.list.

    sudo rm /etc/apt/sources.list.d/nemh-systemback-precise.list
    
  • Optional: Stop trusting the key

    Use apt-key list to list trusted keys. Look for an entry like "Launchpad PPA for Kendek" in this case. Then use apt-key del to delete it:

    sudo apt-key del 73C62A1B
    
  • Thank you for your clear answer! I deleted the package. The key was not remove. So I will delete the key too then, since do not want anything unnecessary left to my system. Any tool which does both? – Léo Léopold Hertz 준영 Jul 30 '15 at 20:04
  • I don't know of a tool that does both. – Celada Jul 30 '15 at 20:12
  • 4
    Note: the short key id is no longer shown when you use the apt-key list command, but it is actually the last 8 characters of the long key that is shown. – Mike Nakis Apr 6 at 10:04
  • There is nothing in my /etc/apt/sources.list.d/ and I still have errors caused by running add-apt-repository of a broken mirror – Freedo May 23 at 7:56

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