A user-added repository that keeps failing doing an apt update can be a very frustrating problem, luckily we can quickly resolve the issue by removing the offending repository.
When adding a repository, the sudo add-apt-repository -r ppa:user/some-repo-name, if we want to remove it again, we should simply call the same command with the --remove option:
sudo add-apt-repository --remove ppa:user/name-of-ppa
If you do not remember which PPA to remove, you can instead attempt a manual removal.
Manually removing a repository
Sometimes you might need to open the sources.list file and comment out, or remove, the offending lines. This can be done using nano in a terminal:
sudo nano /etc/apt/sources.list
Other times you might need to delete the repository in the sources.list.d directory:
sudo rm /etc/apt/sources.list.d/name-of-repo.*
This directory holds sources that are auto-loaded when running an apt update. The directory contains files ending in .save and .list, and both should be removed in order to fix the issue.
- Repositories/Ubuntu - help.ubuntu.com