Issue
I'm using Ubuntu 16.04 and I've followed the instructions, Uninstalling the Heroku CLI.
sudo apt-get remove heroku
sudo apt-key del <Heroku's key from 'apt-key list'>
I didn't uninstall heroku-toolbelt
package since it was not found.
Also /etc/apt/sources.list.d/heroku.list
doesn't exist.
Problem arises when I do subsequent sudo apt update
and sudo apt dist-upgrade
.
Err:7 https://cli-assets.heroku.com/branches/stable/apt ./ InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C927EBE00F1B0520
...
...
...
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://cli-assets.heroku.com/branches/stable/apt ./ InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C927EBE00F1B0520
W: Failed to fetch https://cli-assets.heroku.com/branches/stable/apt/./InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C927EBE00F1B0520
W: Some index files failed to download. They have been ignored, or old ones used instead.
I guess apt-key del
broke the apt but I wanted to completely uninstall Heroku-CLI (which included the key) as I no longer need it.
Solution
Running
sudo add-apt-repository -r "deb https://cli-assets.heroku.com/branches/stable/apt ./"
Solved the problem.
Answered By - V412270