When I look in my /etc/apt/sources.list.d
directory, I have the following files:
bazel.list
bazel.list.save
deadsnakes-ubuntu-ppa-focal.list
google-cloud-sdk.list
google-cloud-sdk.list.save
Whenever I run sudo apt update
, I get a bunch of errors related to the Bazel and Google Cloud repos, e.g.
An error occurred during the signature verification. The repository is not updated and the
previous index files will be used. GPG error: https://packages.cloud.google.com/apt cloud-sdk
InRelease: The following signatures couldn't be verified because the public key is not available:
NO_PUBKEY xxx NO_PUBKEY xxx
Rather than trying to fix that error, I really just want to wipe out all custom Apt sources and PPAs - I am also having some issues with the deadsnakes PPA interfering with system Python.
My question: What steps do I need to take to completely remove custom Apt sources from my Ubuntu installation? Is it enough to just delete the files in the /etc/apt/sources.list.d
directory? Should I also run sudo add-apt-repository --remove
? Are there GPG or other keys stored somewhere that I need to purge?
I did see How can PPAs be removed?, which gives me a clue about how to remove the deadsnakes PPA, but I'm still not sure about the Google lists.
I'm running Ubuntu 20.04.5 LTS on WSL 2.