Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

5 Answers

up vote 45 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

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

Run these commands:

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

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

share|improve this answer

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

Viola.

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

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.