![如何从 apt-repository 中彻底删除 AtomEditor 包?](https://linux22.com/image/1201033/%E5%A6%82%E4%BD%95%E4%BB%8E%20apt-repository%20%E4%B8%AD%E5%BD%BB%E5%BA%95%E5%88%A0%E9%99%A4%20AtomEditor%20%E5%8C%85%EF%BC%9F.png)
$ sudo apt update
...
Ign:6 https://packagecloud.io/AtomEditor/atom/any any InRelease
Err:8 https://packagecloud.io/AtomEditor/atom/any any Release
404 Not Found [IP: 52.8.40.176 443]
E: The repository 'https://packagecloud.io/AtomEditor/atom/any any Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
我该如何解决此更新问题?
AtomEditor 之前安装在该系统中,但在停用后被删除。尽管未出现在 中,但删除似乎并不完整Software & Updates - Other Software
。
有一个相关的问题但我无法使用它的答案,因为正如我上面所示,我没有可用于命令的 Atom 的 ppa 路径ppa-purge
。
您能否提供解决此问题所需的确切命令?我尝试过这些命令,但都不起作用:
$ sudo ppa-purge [ppa:]https://packagecloud.io/AtomEditor/atom
Updating packages lists
E: The repository 'https://packagecloud.io/AtomEditor/atom/any any Release' no longer has a Release file.
Warning: apt-get update failed for some reason
$ sudo ppa-purge [ppa:]packagecloud.io/AtomEditor/atom
Updating packages lists
E: The repository 'https://packagecloud.io/AtomEditor/atom/any any Release' no longer has a Release file.
Warning: apt-get update failed for some reason
$ sudo ppa-purge [ppa:]AtomEditor/atom
Updating packages lists
E: The repository 'https://packagecloud.io/AtomEditor/atom/any any Release' no longer has a Release file.
Warning: apt-get update failed for some reason
$ sudo ppa-purge ppa:packagecloud.io/AtomEditor/atom
Updating packages lists
E: The repository 'https://packagecloud.io/AtomEditor/atom/any any Release' no longer has a Release file.
Warning: apt-get update failed for some reason
$ sudo ppa-purge ppa:AtomEditor/atom
Updating packages lists
E: The repository 'https://packagecloud.io/AtomEditor/atom/any any Release' no longer has a Release file.
Warning: apt-get update failed for some reason
回答:
鉴于所引用的重复问题中没有一个答案回答了我的问题,我认为我的问题不应该被关闭,以便有人可以提供答案。无论如何,我将在这里提供我的问题的答案,希望它能帮助其他面临类似问题的人。
我发现以下遗留文件导致了该问题:
/etc/apt/sources.list.d/atom.list
/etc/apt/sources.list.d/atom.list.save
它们包含在以下过程中查找的说明sudo apt update
:
deb [arch=amd64 signed-by=/usr/share/keyrings/atom.gpg] https://packagecloud.io/AtomEditor/atom/any/ any main
适用于“sunset”Atom 软件包。只需删除这些文件即可解决我的问题。
总之,管理旧版软件包更新问题的方法是检查文件夹/etc/apt/sources.list.d/
中相应的旧版更新文件,并使用命令将其删除sudo rm
。
澄清:上述解决方案适用于 Ubuntu 22.04。对于早期版本,请参阅@ahmedhamdy 的评论。