2

I'm checking out the test net and a friendly person gave me access to his private key so that I didn't need to generate coins, so I importprivkey the key, sent me some coins and...

Well, I understand that now my wallet contains those 2 addresses, how can I remove his address, if possible?

Why do I want to do this? Because I'm testing stuff out and I don't want his transactions / tests cloud mine.

Thanks

4

There is no way to 'un-import' a private key in the core client. What you could do instead is:

  1. Make a list of all the private keys you do care about.
  2. Close your client.
  3. Move the wallet.dat out of the data directory to some other location.
  4. Start the client.
  5. Re-import all the private keys that you do want in your wallet.

This is sort of a work around, and it may be kind of tedious, sorry there isn't a better solution currently.

  • 6
    Your answer is correct, but I wanted to note that it might be easier in this specific case to use dumpwallet to create a text file of all keys, delete the single key @Valmond doesn't want, move the wallet.dat away, and then use importwallet to import the modified dumpwallet backup. Because dumpwallet also includes the date each key was first used, this can also save import (rescanning) time. – David A. Harding Mar 9 '15 at 22:00
  • I often have wondered why it's so cumbersome myself: perhaps the possibility of a lost private key outweighs the convenience factor – Wizard Of Ozzie Mar 10 '15 at 3:06
  • Thanks, perfect! ps. I bet deleting a private key isn't something people other than developers need to do so it could be risky to have that option. – Valmond Mar 11 '15 at 8:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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