Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Forgive my incompetence I am still new to GNU/Linux. I use Debian wheezy.

When I type apt-get update

I get this at the end

W: Failed to fetch http://ppa.launchpad.net/webupd8team/java/ubuntu/dists/wheezy/main/source/Sources  404  Not Found

W: Failed to fetch http://ppa.launchpad.net/webupd8team/java/ubuntu/dists/wheezy/main/binary-amd64/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.

My question is, how would I edit (I'm guessing what apt looks at) to ignore the things that failed to update.. or to remove them completely so I don't get that message anymore.

EDIT:

The only thing I see in sources.list is

deb ftp.sun.ac.za/debian wheezy main contrib non-free
deb-src ftp.sun.ac.za/debian wheezy main contrib non-free
deb security.debian.org wheezy/updates contrib non-free main
deb-src security.debian.org wheezy/updates contrib non-free maim

and that's it. Should I delete one of these? I looked inside sources.list.d as well and that came up empty

2nd EDIT:

The output of apt-cache policy is

Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://ppa.launchpad.net/webupd8team/java/ubuntu/ trusty/main amd64 Packages
     release v=14.04,o=LP-PPA-webupd8team-java,a=trusty,n=trusty,l=Oracle Java (JDK) 6 / 7 / 8 Installer PPA,c=main
     origin ppa.launchpad.net
 500 http://security.debian.org/ wheezy/updates/non-free Translation-en
 500 http://security.debian.org/ wheezy/updates/main Translation-en
 500 http://security.debian.org/ wheezy/updates/contrib Translation-en
 500 http://security.debian.org/ wheezy/updates/main amd64 Packages
     release v=7.0,o=Debian,a=stable,n=wheezy,l=Debian-Security,c=main
     origin security.debian.org
 500 http://security.debian.org/ wheezy/updates/non-free amd64 Packages
     release v=7.0,o=Debian,a=stable,n=wheezy,l=Debian-Security,c=non-free
     origin security.debian.org
 500 http://security.debian.org/ wheezy/updates/contrib amd64 Packages
     release v=7.0,o=Debian,a=stable,n=wheezy,l=Debian-Security,c=contrib
     origin security.debian.org
 500 ftp://ftp.sun.ac.za/debian/ wheezy/non-free Translation-en
 500 ftp://ftp.sun.ac.za/debian/ wheezy/main Translation-en
 500 ftp://ftp.sun.ac.za/debian/ wheezy/contrib Translation-en
 500 ftp://ftp.sun.ac.za/debian/ wheezy/non-free amd64 Packages
     release v=7.4,o=Debian,a=stable,n=wheezy,l=Debian,c=non-free
     origin ftp.sun.ac.za
 500 ftp://ftp.sun.ac.za/debian/ wheezy/contrib amd64 Packages
     release v=7.4,o=Debian,a=stable,n=wheezy,l=Debian,c=contrib
     origin ftp.sun.ac.za
 500 ftp://ftp.sun.ac.za/debian/ wheezy/main amd64 Packages
     release v=7.4,o=Debian,a=stable,n=wheezy,l=Debian,c=main
     origin ftp.sun.ac.za
Pinned packages:

3rd and final EDIT: after entering grep -Ri launchpad * I was able to look at what the results I got back were and proceeded to enter nano sources.list.d/webupd8team-java.list and delete everything that was there. I then proceeded to also enter nano sources.list.d/webupd8team-java-wheezy.list and deleted everything that was there as well. Then I did apt-get update and everything is back to normal . Hope this helps anyone that might be facing the same problem.

share|improve this question
    
I see ppa.launchpad.net in your output of apt-cache policy. That suggests that this is mentioned somewhere. Are you sure there is nothing in /etc/apt/sources.list.d? If so, this seems a little strange. –  Faheem Mitha Apr 17 at 13:02
    
As @Braiam, suggests, try doing a grep. I'd actually suggest just a grep -Ri launchpad /etc/apt/. Or even cd /etc/apt. And then grep -Ri launchpad *. –  Faheem Mitha Apr 17 at 13:45
    
Hi. Yes, you are correct. When I type cd /etc/apt/ and grep -Ri launchpad * it shows sources.list.d/webupd8team-java-wheezy.list:deb http://ppa.launchpad.net/webupd8team/java/ubuntu wheezy main sources.list.d/webupd8team-java-wheezy.list:deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu wheezy main sources.list.d/webupd8team-java.list:deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main sources.list.d/webupd8team-java.list:deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main which is exactly what's causing this. How would I go about removing it? –  Space Ghost Apr 18 at 12:51
    
Just put a # in front of the relevant lines. This will comment out those lines so apt won't see it, as mentioned in my answer. Or you could just remove the files. –  Faheem Mitha Apr 18 at 12:58
    
^ I understand that part, but where do I do this (as mentioned, I'm pretty new, sorry.)? How do I get to the file. EDIT: I got it. I used nano sources.list.d/webupd8team-java.list and I found where they're located. Thank you so much guys. –  Space Ghost Apr 19 at 1:06

2 Answers 2

up vote 5 down vote accepted

Most of the time, a source line will be in the file /etc/apt/sources.list, so you should edit that. However, if you don't find it there, look at files inside the directory /etc/apt/sources.list.d. As far as I know, a source line must be on of those two places. Reference: man sources.list.

Putting the comment character # in front of any source line should be enough for apt to ignore it.

share|improve this answer
    
I did as you suggested. The only thing I see in sources.list is deb ftp.sun.ac.za/debian wheezy main contrib non-free deb-src ftp.sun.ac.za/debian wheezy main contrib non-free deb security.debian.org wheezy/updates contrib non-free main deb-src security.debian.org wheezy/updates contrib non-free main and thats it. Should I delete one of these? I looked inside sources.list.d as well and that came up empty. –  Space Ghost Apr 17 at 11:47
    
Ok. Add those into the question, not as a comment. It is pertinent to the question. The sources line you reference must be in one of the places I mentioned, as far as I know. See man sources.list. Are you still seeing that error when you run apt-get update? Please also post the output of apt-cache policy in your question. Thanks. –  Faheem Mitha Apr 17 at 12:11

There should be a line with launchpad somewhere. This should show where:

grep -Ri launchpad /etc/apt/sources.list*

Could be also that you have configured a personalized path for sources.lists:

grep -R Dir /etc/apt/apt.conf*

Find it and remove it.

share|improve this answer
    
Thanks, this helped me a lot. –  Space Ghost Apr 19 at 1:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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