如何手动删除/移除 apt 添加的存储库?

如何手动删除/移除 apt 添加的存储库?

请帮助我:我手动添加了此存储库,但无法删除它们

echo 'deb http://download.opensuse.org/repositories/home:/Horst3180/Debian_8.0/ /' > /etc/apt/sources.list.d/vertex-theme.list

wget http://download.opensuse.org/repositories/home:Horst3180/Debian_8.0/Release.key

我尝试使用删除密钥apt-key list然后使用 id 删除,它成功删除了密钥但是当我使用时apt update我得到这个输出:

W: GPG error: http://download.opensuse.org/repositories/home:/Horst3180/Debian_8.0  Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5A7D1D38BEB6D886
E: The repository 'http://download.opensuse.org/repositories/home:/Horst3180/Debian_8.0  Release' is not signed.
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.

apt update我只希望能够像全新安装操作系统一样正常运行

答案1

只需删除创建的.list文件:

sudo rm /etc/apt/sources.list.d/vertex-theme.list
sudo rm /etc/apt/sources.list.d/vertex-theme.list.save

之后运行并更新,甚至可能进行 dist 升级:

sudo apt update
sudo apt dist-upgrade

由于您已经移除了密钥,因此您无需再执行任何操作。

相关内容