How to remove a artifactory repository?

I have this repository https://apache.jfrog.io/artifactory/couchdb-deb that is preventing me to update the system, what is the easiest way to remove it? I have tried using PPA purge but not being a PPA repo I can't remove it by using those recommendations.

Doing grep -r 'apache\.jfrog' /etc/apt/sources.list* I get:

/etc/apt/sources.list.d/couchdb.list.distUpgrade:deb [signed-by=/usr/share/keyrings/couchdb-archive-keyring.gpg] https://apache.jfrog.io/artifactory/couchdb-deb/ groovy main

/etc/apt/sources.list.d/couchdb.list:deb [signed-by=/usr/share/keyrings/couchdb-archive-keyring.gpg] https://apache.jfrog.io/artifactory/couchdb-deb/ groovy main

/etc/apt/sources.list.d/couchdb.list.save:deb [signed-by=/usr/share/keyrings/couchdb-archive-keyring.gpg] https://apache.jfrog.io/artifactory/couchdb-deb/ groovy main

Solution 1:

Why the usual way to disable a repository does not work for you is unclear for me.

However, you can

  1. Find the file where the repository is set:

    grep -rn 'apache\.jfrog' /etc/apt/sources.list*
    

    Output can be something like:

    /etc/apt/sources.list.d/couchdb.list:2:deb [signed-by=/usr/share/keyrings/couchdb-archive-keyring.gpg] https://apache.jfrog.io/artifactory/couchdb-deb/ groovy main
    

    This means, the repository is set in the second line of the file /etc/apt/sources.list.d/couchdb.list.

    Note, only files named *.list need to be considered.

  2. Comment out the respective line

    sudo sed -i '2s/^/# /' /etc/apt/sources.list.d/couchdb.list
    

    or remove the file, if you're sure that it does not list any other repositories that are needed.

    sudo rm /etc/apt/sources.list.d/couchdb.list
    
  3. Update/Upgrade your system

    sudo apt update
    sudo apt upgrade
    
  4. Then you can update to a supported release, following answers to this question.