Ubuntu 22.04.3 LTS下apt update遇gnome3相关PPA无Release文件错误的解决及恢复默认源咨询
Hey there! Let's break down what's going on and fix this issue step by step.
First, let's confirm the problem from your error output:
Err:13 https://ppa.launchpadcontent.net/gnome3-team/gnome3/ubuntu jammy Release
404 Not Found [IP: 185.125.190.52 443]Err:14 https://ppa.launchpadcontent.net/gnome3-team/gnome3-staging/ubuntu jammy Release
404 Not Found [IP: 185.125.190.52 443]E: The repository 'https://ppa.launchpadcontent.net/gnome3-team/gnome3/ubuntu jammy Release' does not have a Release file.
The root cause here is that the gnome3-team/gnome3 and gnome3-team/gnome3-staging PPAs don't provide support for Ubuntu 22.04 (codename Jammy Jellyfish) anymore. That's why you're getting 404 errors when apt tries to fetch their Release files.
Fix the immediate apt update error
To resolve this, you just need to remove these two broken PPAs from your system:
Option 1: Use the add-apt-repository command (simplest)
Run these two commands in your terminal:
sudo add-apt-repository --remove ppa:gnome3-team/gnome3 sudo add-apt-repository --remove ppa:gnome3-team/gnome3-staging
Option 2: Manually delete the PPA files
If the first option doesn't work, you can directly remove the source files for these PPAs:
sudo rm /etc/apt/sources.list.d/gnome3-team-*.list
After removing the broken PPAs, run the update command again and it should work without those errors:
sudo apt update
Revert all repositories back to default
If you want to completely reset your sources to the default Ubuntu 22.04 ones (removing all third-party PPAs like Spotify, Chrome, etc.), here's how to do it:
- Backup your current sources (just in case you need to revert later):
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak sudo cp -r /etc/apt/sources.list.d/ /etc/apt/sources.list.d.bak/
- Replace the main sources.list file with default Jammy content:
Run these commands to overwrite your current sources.list with the official default repositories:
sudo sh -c 'cat > /etc/apt/sources.list << EOF deb http://archive.ubuntu.com/ubuntu jammy main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse deb http://security.ubuntu.com/ubuntu jammy-security main restricted universe multiverse EOF'
- Remove all third-party PPA files (this will delete sources for Spotify, Chrome, fprint, etc.):
sudo rm /etc/apt/sources.list.d/*.list
- Update your package lists to apply the changes:
sudo apt update
That's it! Your system will now use only the default Ubuntu repositories, and the apt update errors should be gone.
备注:内容来源于stack exchange,提问作者mmaarij

