title: Uninstalling Heroku CLI broke apt in Ubuntu
body: <p>I'm using Ubuntu 16.04 and I've followed the instructions, <a href="https://devcenter.heroku.com/articles/heroku-cli#uninstalling-the-heroku-cli" rel="nofollow noreferrer">Uninstalling the Heroku CLI</a>.</p>
  
  <pre><code>sudo apt-get remove heroku
  sudo apt-key del &lt;Heroku's key from 'apt-key list'&gt;
  </code></pre>
  
  <p>I didn't uninstall <code>heroku-toolbelt</code> package since it was not found.
  Also <code>/etc/apt/sources.list.d/heroku.list</code> doesn't exist.</p>
  
  <p>Problem arises when I do subsequent <code>sudo apt update</code> and <code>sudo apt dist-upgrade</code>.</p>
  
  <pre><code>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.
  </code></pre>
  
  <p>I guess <code>apt-key del</code> broke the apt but I wanted to completely uninstall Heroku-CLI (which included the key) as I no longer need it.</p>