Ubuntu清理失效的PPA软件源

在安装各种软件的过程中,难免会添加一堆PPA软件源,在执行update的时候发现有一些失效了的PPA源,可以采用以下方法清理。

查找出失效的PPA源:

sudo apt-get update | grep "Failed"

可以看到类似如下的输出:

W: 仓库 “http://ppa.launchpad.net/format-junkie-team/release/ubuntu xenial Release” 没有 Release 文件。
E: 无法下载 http://ppa.launchpad.net/format-junkie-team/release/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found
E: 部分索引文件下载失败。如果忽略它们,那将转而使用旧的索引文件。

删除无效的PPA源:

sudo add-apt-repository -r ppa:format-junkie-team/release

其中format-junkie-team/release是从之前的输出结果中得到的,位于仓库链接中。

然后提示:

This is the official PPA for the Format Junkie.
This PPA currently has support for Precise, Quantal, and Raring. It does not have support for any other releases.
更多信息: https://launchpad.net/~format-junkie-team/+archive/ubuntu/release
按 [ENTER] 可继续操作,按 ctrl-c 可取消其删除操作

按回车键继续即可。

阿里云