无法在源文件中找到源链接,但仍显示在 apt 更新中

无法在源文件中找到源链接,但仍显示在 apt 更新中

我是新手,我尝试在 18.04 中安装 MS SQL。但我遇到了一些问题,想删除与 MS SQL 相关的所有内容。

所以我purge删除了所有/etc/apt/sources.list与 Microsoft 相关的 GPG。

我还删除了从

curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - 使用命令

sudo apt-key listsudo apt-key del xxxxxx

现在当我这样做时,apt update我看到以下日志:

Hit:4 https://packages.microsoft.com/ubuntu/16.04/prod xenial InRelease        
Get:5 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Err:4 https://packages.microsoft.com/ubuntu/16.04/prod xenial InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF
Fetched 88.7 kB in 1s (90.6 kB/s)                              
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.microsoft.com/ubuntu/16.04/prod xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF
W: Failed to fetch https://packages.microsoft.com/ubuntu/16.04/prod/dists/xenial/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF
W: Some index files failed to download. They have been ignored, or old ones used instead.

我不太清楚自己在做什么 :)。但我只想了解这里发生了什么,以及我现在应该做什么来删除它。

答案1

查看您的/etc/apt/sources.list.d/目录,看看是否有一些 Microsoft 源位于那里。此find查询也可能对您有帮助。

sudo find /etc/apt -name '*.list' -exec grep -i 'https://packages.microsoft.com' {} \; -print

这将返回包含字符串的文件https://packages.microsoft.com

相关内容