9

Question

I have a repo that causes an error to appear whenever i update or install anything.

How can i remove it?

Error message

W: Failed to fetch http://repo.offensive-security.com/dist/bt4/binary/en_GB  Unable to connect to repo.offensive-security.com:http:

3 Answers 3

5

To change the apt repository list you need to edit /etc/apt/sources.list.

If this answer does not solve your problem, please edit your question and paste the content of /etc/apt/sources.list.

Use sudo nano /etc/apt/sources.list in the terminal and then delete the lines corresponding to the unwanted repository.

2
  • Worked great thank you, going to edit your answer to help others with same problem.
    – Dan Cundy
    Commented Sep 23, 2014 at 15:41
  • You can also edit out the line in /etc/apt/sources.list by using # In case you want to re-use it later.
    – Harry
    Commented Jun 18, 2016 at 11:08
21

What worked for me:

  1. Check your /etc/apt/sources.list and remove unwanted sources.

    sudo nano /etc/apt/sources.list
    
  2. If step 1 does not solve your problem, see what other sources are used:

    sudo ls -al /etc/apt/sources.list.d/
    
  3. If you have found a source-list causing the problem, remove it (in the example below, NodeJS source list is removed):

    sudo rm /etc/apt/sources.list.d/nodesource.list
    
1
  • 1
    Things hide in so many logical places. Remembering them all is why we're here! Thank you! Commented Sep 15, 2022 at 14:52
0

OK THis is major: If you are unable to download the Pi2 version, edit (Nano) the list file(s) in etc/apt/sources.list.d folder. THere will be an line YOU MUST CHANGE to get the files into your repository. "arch=amd64" MUST BE CHANGED TO "arch=armhf". THen check the repository list with "sudo apt-cache policy AppNameHere". If you dont have the names of the downloads, you've done it wrong.

1
  • Hello, and welcome to the Raspberry Pi Stack Exchange site, and thanks for your answer. The system has flagged your answer, and asked that I review it to make suggestions for improving it. After reading you answer, I'm going to suggest that you expand and clarify it. IMHO, some additional detail and specificity will greatly improve your answer. Also, it's always a good idea to work through your answer on your own system to ensure everything is correct before posting.
    – Seamus
    Commented Dec 8, 2018 at 17:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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