如何一次性删除导致GPG错误的软件包

Abh*_*Pal 3 upgrade updates package-management apt ppa

所以有两个PPA在期间引起GPG警告sudo apt update

W: GPG error: https://brave-browser-apt-release.s3.brave.com bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4FE13824E3FFC656
E: The repository 'https://brave-browser-apt-release.s3.brave.com bionic InRelease' 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.
W: GPG error: http://repository.spotify.com stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4773BD5E130D1D45
E: The repository 'http://repository.spotify.com stable InRelease' 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.
Run Code Online (Sandbox Code Playgroud)

我想从我的系统中删除这些 PPA,如何立即执行此操作?

grep -r 'repository.spotify.com ' /etc/apt
Run Code Online (Sandbox Code Playgroud)

输出

/etc/apt/sources.list.d/spotify.list:deb http://repository.spotify.com stable non-free


grep -r 'brave-browser-apt-release.s3.brave.com' /etc/apt
Run Code Online (Sandbox Code Playgroud)

输出

/etc/apt/sources.list.d/brave-browser-release-bionic.list:deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ bionic main
/etc/apt/sources.list.d/brave-browser-release-bionic.list.save:deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ bionic main
Run Code Online (Sandbox Code Playgroud)

小智 10

重新安装程序,但删除/etc/apt/sources.list.d/. 如果是Brave,则查看命令是否有对应的文件

ls /etc/apt/sources.list.d/brave-browser-*.list

之前,将其删除

sudo rm /etc/apt/sources.list.d/brave-browser-*.list