Debian – how can I change what the command “apt-get update” looks for when executing the update

aptdebian

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 .

Best Answer

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.

Related Question