I am attempting to allow multiple bitcoin addresses to be created per account, but how can I delete them using the standard API? There doesn't seem to be a function for that.

E.g. the acccount "Test" :

Array (
[0] => 1JQQXBRrG5h7uW8StVtJRcGEdb4YYTqnas
[1] => 1LP8VeKDNKAgErCnYVAFvGMnrGbM3oHe6u
[2] => 1LwTx3a7hy4FZ5EJMxcPnRG9ap8AUwd2cm
[3] => 1AtbnW8dPuzp6jVnAvipiJR4o1BupCcU8D
[4] => 1K7FyNgmJ4ryjKgNz9ybxzQcYrGDEbYEUX
[5] => 1Ng77Nq1SF46MDZnz4pEirCEbbiHZ1Wthp
[6] => 175FKAiJSC9wA12BPcYZD6drTYLxXXChdZ

What if the user just wants to delete 1JQQXBRrG5h7uW8StVtJRcGEdb4YYTqnas?


  • Are you using the accounts feature of bitcoind?
    – Nick ODell
    Jan 11 '15 at 17:46
  • @NickODell I am :) Jan 11 '15 at 17:47
  • Do you want to delete the account, delete the address, or dis-associate the address from that account?
    – morsecoder
    Jan 12 '15 at 3:38
  • @StephenM347 I'd like to delete an account! Jan 25 '15 at 16:55
  • @PatrickGeyer, I was confused because in your question you ask "What if the user just wants to delete 1JQQXBRrG5h7uW8StVtJRcGEdb4YYTqnas?" I'm glad you've got it figured out, though.
    – morsecoder
    Jan 25 '15 at 17:02

bitcoind does not allow you to delete addresses. (If it did, the next question people would ask is, "How do I undelete addresses?" :))

However, you can use the rpc call setaccount to change the account associated with the address. The first argument to setaccount should the the address you're changing; the second shound be the account you're moving it to. (If you want to move it to the default account, put "" as the second argument.)

Note that this does not change the balance of the account; balances are tracked internally. If you want to keep this consistent, run getreceivedbyaddress, then move that balance to the new account.

You can also use PyWallet to delete addresses permanently. Use the --multidelete option, and pass it a path to a file. That file should contain key as the first line, followed by each address you want to delete, each on a new line.

  • Thanks, I've used piwallet, but is there a way to do this from command line, not Web interface? Jan 12 '15 at 7:29
  • @PatrickGeyer See edit.
    – Nick ODell
    Jan 12 '15 at 7:38
  • This is exactly what I am looking for, thanks so much :) Jan 12 '15 at 7:39
  • What format should that file be? Is .txt okay? Jan 12 '15 at 21:20
  • 1
    @PatrickGeyer Yes.
    – Nick ODell
    Jan 12 '15 at 22:33

Just to answer the explicit question "how to delete an account": you cannot. The label will stick to another – eventuallay unused – addresses. for further information, read this issue: https://github.com/bitcoin/bitcoin/issues/1231#issuecomment-6305302

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.