How to apt-delete-repository?

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?

To remove a repository, you have to do two 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
    

As mentioned in the comments by @SeF,
you can use the following command:

sudo add-apt-repository -r <the repo you want to remove>
Answered By: Celada
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.