how to remove update repo that always fails

A week or so ago I tried to add a new package repo that supposedly had a package I wanted. Unfortunately, the information about it was out of date, and I found that it fails to connect to it each time. I'd like to just remove the new repo, but I'm not sure how to do that.

For context, when I update, I get this:

W:Failed to fetch http://ppa.launchpad.net/geod/ppa-geod/ubuntu/dists/precise/main/source/Sources  404  Not Found [IP: 135.214.42.30 8080]
, W:Failed to fetch http://ppa.launchpad.net/geod/ppa-geod/ubuntu/dists/precise/main/binary-amd64/Packages  404  Not Found [IP: 135.214.42.30 8080]
, W:Failed to fetch http://ppa.launchpad.net/geod/ppa-geod/ubuntu/dists/precise/main/binary-i386/Packages  404  Not Found [IP: 135.214.42.30 8080]
, E:Some index files failed to download. They have been ignored, or old ones used instead.

Solution 1:

Open a terminal window (ctrl-alt-t) and run

sudo apt-get install ppa-purge

sudo ppa-purge ppa:geod/ppa-geod

That should do the trick, and remove the repository along with installed packages.

Yet another way is sudo add-apt-reposiry -r ppa:geod/ppa-geod. That will just remove the repositry.

Alternatively, you can run software-properties-gtk, in the window that opens, select the Other Software Tab, find the corresponding lines and delete them.

Solution 2:

If you know the repo error just use sudo rm /etc/apt/sources.list.d/REPO-DIST.list

If you want to check what you've added and then remove from there you always can check with:

ls /etc/apt/sources.list.d/

Then with the command mentioned above.

Solution 3:

Here is the easy way:

  1. Open the Terminal
  2. sudo software-properties-gtk
  3. Window will open
  4. go to "Other Software" tab
  5. select item from the list that you want to remove
  6. Click on Remove and you are done. Cheers !!!