This error shows up on my sudo apt update:
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/repos/code stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF
It is only a warning but it is annoying. I don't use this repo. I had another similar error which I got rid of using sudo add-apt-repository --remove but this one doesn't seem to have a repo for add-apt-repository to find.
I think I installed it (years ago) using sudo dpkg -i packages-microsoft-prod.deb having downloaded the deb file as described here
but I can't see how to uninstall it. I tried the dpkg --remove command but I can't find a way to specify the repository. for example
sudo dpkg --remove packages.microsoft.com
tells me the package isn't installed. I also tried packages-microsoft-prod and every variation in between. Always package not found.
So I did a dpkg -l to list the packages and it isn't there. But I'm aware that we're now talking about packages rather than repositories.
Is there a way to remove the repository I added with dpkg? Or something else?