Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I don't need the key in my server's keyring anymore. Is it possible to remove it? I added the key using this command:

 curl | apt-key add -

Thanks for helping

share|improve this question
up vote 81 down vote accepted

First you need to find the key id of the key you added. Do this by the command:

sudo apt-key list

It will list all the keys that you have, with each entry looking like this:

pub   1024R/B455BEF0 2010-07-29
uid                  Launchpad clicompanion-nightlies

Once you have figured out which key to remove, use the command sudo apt-key del <keyid> where is replaced with the actual keyid of the key you want to remove from your keyring.

nits@nits-excalibur:~$ sudo apt-key del B455BEF0
[sudo] password for nits: 
nits@nits-excalibur:~$ apt-key list | grep clicompan

As you can see the key gets removed :)

share|improve this answer
thank you for helping me. – Raymond Feb 24 '12 at 20:13
@Raymond No problemo :) – Nitin Venkatesh Feb 24 '12 at 20:15
Ah I see the unique Id is on the line labelled pub, not the line labelled uid. – richard Jun 21 at 7:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.