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:

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.

  • Worked great thank you, going to edit your answer to help others with same problem. – Dan Cundy Sep 23 '14 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 Jun 18 '16 at 11:08

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

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.

  • 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 Dec 8 '18 at 17:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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