如何从 apt-get 中删除存储库?我知道这是重复的,但现有的答案对我不起作用。
当我运行时apt-get update
出现以下错误:
Err:13 https://dl.winehq.org/wine-builds/ubuntu xenial InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dl.winehq.org/wine-builds/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F
我不再需要酒了所以我一直试图将其去除。
当我运行的时候sudo apt-cache policy
,我可以看到 Wine 的存储库列表如下:
500 https://dl.winehq.org/wine-builds/ubuntu xenial/main i386 Packages
release v=16.04,o=dl.winehq.org,a=xenial,n=xenial,l=winehq,c=main,b=i386
origin dl.winehq.org
500 https://dl.winehq.org/wine-builds/ubuntu xenial/main amd64 Packages
release v=16.04,o=dl.winehq.org,a=xenial,n=xenial,l=winehq,c=main,b=amd64
origin dl.winehq.org
我尝试了各种不同的语法来删除存储库,但都不起作用。以下是我尝试过的一些方法:
sudo add-apt-repository --remove ppa:https://dl.winehq.org/wine-builds/ubuntu
sudo apt-add-repository --remove 'deb https://dl.winehq.org/wine-builds/ubuntu xenial inRelease'
sudo apt-add-repository --remove 'deb https://dl.winehq.org/wine-builds/ubuntu ./'
sudo apt-add-repository --remove 'https://dl.winehq.org/wine-builds/ubuntu ./'
sudo apt-add-repository --remove 'https://dl.winehq.org/wine-builds/ubuntu'
答案1
/etc/apt/sources.list.d
从文件中删除包含指向该存储库的链接的文件/etc/apt.sources.list
。
答案2
这对我有用
sudo add-apt-repository --remove wine-builds
答案3
导航到/etc/apt/sources.list.d
。在那里你会看到一些文件。你只要看一下就能明白这些文件是什么。然后右键单击打开终端。然后输入sudo rm <filename>
。将其替换为要删除的文件。