How to fix a 404 Error when using a PPA or updating the package lists?
Tags: ubuntu, aptpparepository
Published: 2021-11-25 17:06:09

---
title: How to fix a 404 Error when using a PPA or updating the package lists?
published: true
date: 2021-11-22 16:17:40 UTC
tags: Ubuntu,aptpparepository
canonical_url: https://stackallflow.com/ubuntu/how-to-fix-a-404-error-when-using-a-ppa-or-updating-the-package-lists/
---

<header>
<p><span style="font-size: 1.2em; color: initial;">apt</span><span style="font-size: 1.2em; color: initial;">ppa</span><span style="font-size: 1.2em; color: initial;">repository</span></p>
</header>

PPA seems to be constantly offline. Whenever I use `sudo apt-get update`, this error is shown:

```
W: Failed to fetch http://ppa.launchpad.net/ 404 Not Found

```

How do I fix these errors?

#### Accepted Answer

## Automated removal

skip to the bottom of this answer for a scripted way to remove offending software-sources for all ubuntu versions prior to Ubuntu 15.04

## [What are 404 errors](http://en.wikipedia.org/wiki/HTTP_404)

> The 404 or Not Found error message is a HTTP standard response code  
> indicating that the client was able to communicate with the server,  
> but the server could not find what was requested.
> 
> The web site hosting server will typically generate “404 – Page Not  
> Found” web page, when users attempts to follow a broken or dead link.

## What are the causes of these errors in update-manager

Typically, three main areas cause these errors in `update-manager`

1. A user has just upgraded and has re-enabled a PPA software-source that no longer exists ![enter image description here](https://i.stack.imgur.com/e5uSL.png)
2. A user has manually typed in a new software source incorrectly ![enter image description here](https://i.stack.imgur.com/kzlVd.png)
3. A PPA was added, but the maintainer has subsequently deleted some/all of the PPA

## where are these software-sources

PPAs typically are saved in one of two locations

1. `/etc/apt/sources.list`
2. in an appropriately named file with a .list file-extension in `/etc/apt/sources.list.d/` for example `webupd8team-jupiter-natty.list`

This list file typically contains:

```
deb http://ppa.launchpad.net/webupd8team/jupiter/ubuntu oneiric main
# deb-src http://ppa.launchpad.net/webupd8team/jupiter/ubuntu oneiric main

```

Note a `#` at the front of a line of text means that it is commented out and is not checked by the package manager.

## How to eliminate these errors

Typically, if you run `sudo apt-get update` from a terminal or click the details button in Update Manager after hitting the refresh button you will see errors such as:

![enter image description here](https://i.stack.imgur.com/h2flz.png)

If the error is due to a PPA – usually unticking the similarly named PPA with the URL shown in the error message will resolve this.

![enter image description here](https://i.stack.imgur.com/WA92D.png)

If the 404 error was due to an additional repository that has been added to `/etc/apt/sources.list` then its easier to add `#` character to the start of the line to comment out the offending repository i.e.

```
gksu gedit /etc/apt/sources.list

```

![enter image description here](https://i.stack.imgur.com/X8KvL.png)

## More info

Here is a bug report on the update manager to solve this problem:

- [https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/1049046](https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/1049046)

If you are getting these problems without PPAs, check out this question:

- [How can I fix a 404 Error using the Ubuntu archives?](https://askubuntu.com/questions/234798/how-can-i-fix-a-404-error-using-the-ubuntu-archives)
- [Repositories/Ubuntu – Community Ubuntu Documentation – Removing & Disabling Repositories](https://help.ubuntu.com/community/Repositories/Ubuntu#Removing_.26_Disabling_Repositories)

The post [How to fix a 404 Error when using a PPA or updating the package lists?](https://stackallflow.com/ubuntu/how-to-fix-a-404-error-when-using-a-ppa-or-updating-the-package-lists/) appeared first on [Stack All Flow](https://stackallflow.com).