Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

I added a PPA for updating my kernel for ubuntu-12.04. Later, I found that the kernel doesnot exist on the link within PPA.

I used this command. sudo add-apt-repository ppa:kernel-ppa/ppa

Now if I try sudo apt-get update, I get an error 404, because http://ppa.launchpad.net/kernel-ppa/ppa/ubuntu/dists/precise/main/source/Sources, does not exist.

Trouble is I am unable to do an update. Even not able to do sudo ppa-purge ppa:kernel-ppa/ppa

Suggest a solution.

share|improve this question
add comment

marked as duplicate by Radu Rădeanu, Florian Diesch, Lucio, Eric Carvalho, mikewhatever Jan 3 at 0:49

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

5 Answers

up vote 124 down vote accepted

Simply run apt-add-repository again with the --remove option to remove a PPA added via the command-line, for example:

sudo apt-add-repository --remove ppa:kernel-ppa/ppa

Then update with:

sudo apt-get update
share|improve this answer
will this remove that PPA permanently? –  Chirag Aug 7 '12 at 23:11
Yes, permanently. To use it again, you must add manually as if you were doing it for the first time. –  izx Aug 7 '12 at 23:17
Thanks. Did it. –  Chirag Aug 7 '12 at 23:22
+1 for centuary. –  Avinash Raj Jan 21 at 12:43
For the record, the --remove/-r flag was added in 10.10. Source: askubuntu.com/a/18202/41756 –  Niels Bom Mar 27 at 16:01
add comment

Alternately, as ppas are stored in /etc/apt/sources.list.d you can find the one you want to remove by entering:

ls /etc/apt/sources.list.d

Then when you have noted the name of that offending ppa (e.g. myppa.list), you can enter:

sudo rm -i /etc/apt/sources.list.d/myppa.list

Take care with rm (hence why I have used the interactive switch so you can confirm your actions. Then run sudo apt-get update afterwards.

This method merely removes the ppa .list file; it does not remove any other files or sort out any other problems caused by the ppa; for that you could use ppa-purge after you have got your update ability back (I know you mentioned this in your question, but I am adding this point for future readers): see here for more information on ppa-purge.

share|improve this answer
This worked for me, while the accepted answer did not. –  philshem Apr 10 at 14:47
add comment

ppa-purge is your friend. It automatically uninstalls whatever you installed via the ppa and then removes the ppa.

Install ppa-purge via:

sudo apt-get install ppa-purge

and the use it like this:

sudo ppa-purge ppa-url


share|improve this answer
The OP did already try ppa-purge. –  jokerdino Aug 14 '12 at 12:00
add comment

Run Ubuntu Software Center and from the menu choose "Software Sources" - there you can add/edit/remove repositories.

share|improve this answer
add comment

Run these commands:

sudo add-apt-repository --remove ppa:kernel-ppa/ppa 
sudo apt-get update
share|improve this answer
add comment

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