错误地在 Debian 中下载了一些 Ubuntu 存储库。我该如何删除它们?

错误地在 Debian 中下载了一些 Ubuntu 存储库。我该如何删除它们?

我错误地在 Debian 中下载了一些 Ubuntu 存储库。现在,当我尝试更新系统时,sudo apt-get update我会看到:

W: The repository 'http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu cosmic Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ppa.launchpad.net/gophers/archive/ubuntu bionic InRelease: Ondorengo sinadurak ezin dira egiaztatu gako publikoa ez bait dago eskuragarri: NO_PUBKEY 308C15A29AD198E9
W: The repository 'http://ppa.launchpad.net/gophers/archive/ubuntu bionic InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Ezin da lortu http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu/dists/cosmic/main/binary-i386/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.

如何删除存储库来解决问题?

答案1

如果您曾经apt-add-repository添加存储库,请使用该选项再次运行相同的命令-r,例如

sudo add-apt-repository -r ppa:webupd8team/y-ppa-manager

如果您不能或不想使用add-apt-repository,那么您可以手动删除存储库。它们被记录在/etc/apt/sources.list目录中或文件中/etc/apt/sources.list.d/。要确定哪个文件是罪魁祸首,请运行

grep y-ppa-manager /etc/apt/sources.list /etc/apt/sources.list.d/*.list /etc/apt/sources.list.d/*.sources

如果您添加了某些内容/etc/apt/sources.list,请使用以下命令进行编辑

sudoedit /etc/apt/sources.list

并删除有问题的行。如果您想删除 下文件中的所有条目/etc/apt/sources.list.d,您可以使用以下命令完全删除该文件

sudo rm /etc/apt/sources.list.d/y-ppa-manager.list

还有一个与gophers/archivePPA 无关的错误。如果您想要它,您需要完成设置工作。您需要做三件事才能使包存档可用:

  1. 将其添加到源列表 ( /etc/apt/sources.list*)。
  2. 如果存档已签名(出于安全考虑,强烈建议这样做),您需要通过运行 来表明您信任其密钥。sudo apt-key add filename.key
  3. 跑步sudo apt-get update

当您使用该ppa:语法时,apt-add-repository会同时处理步骤 1 和步骤 2。似乎步骤 2 未在您的计算机上执行。我认为你可以运行add-apt-repository(根据PPA 页面上的说明)来照顾它。或者,您可以添加钥匙手动与

apt-key adv --keyserver keyserver.ubuntu.com --recv-key C73998DC9DFEA6DCF1241057308C15A29AD198E9

keyserver.ubuntu.com是所有 Ubuntu PPA 密钥的密钥服务器,并且是PPA 页面上的签名密钥链接去。末尾的十六进制字符串是 PPA 页面上列出的指纹(您也可以使用错误消息中的较短形式)。

相关内容