2021 August. This is what worked for me.
cd /etc/apt/trusted.gpg.d
sudo rm -R *
sudo apt-get update
The last line will raise errors of missing keys.
What you'd then have to do is manually install each of the keys listed in the errors
for example if the error is saying that your missing PUB_KEY
is 9BDB3D89CE49EC21
,
You can manually add the Key with the command sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9BDB3D89CE49EC21
Re-run sudo apt-get update
Repeat the process for the new key raised in the error
Say if the new key was 3BDB3D89CE49EC24
,
Just Manually add the Key with the command sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3BDB3D89CE49EC24
Re-run sudo apt-get update and repeat the process until all the errors are gone.
Then go back to the package site you were trying to install and repeat the installation process.
For my case, the error was coming while I tried installing Sublime Text
Doing the above and returning to the Sublime installation guide here solved the issues.
Don't forget to upvote if this works for you. And it must do