<p>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: <a href="https://github.com/bitcoin/bitcoin/issues/1231#issuecomment-6305302" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/issues/1231#issuecomment-6305302</a></p>

CC BY-SA 4.0
2018-08-02T01:31:07.290Z
2018-08-02T01:31:07.290Z
vv01f
<p>bitcoind does not allow you to delete addresses. (If it did, the next question people would ask is, "How do I undelete addresses?" :))</p>

<p>However, you can use the rpc call <code>setaccount</code> to change the account associated with the address. The first argument to <code>setaccount</code> 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 <code>""</code> as the second argument.)</p>

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

<p>You can also use <a href="https://github.com/jackjack-jj/pywallet" rel="nofollow">PyWallet</a> to delete addresses permanently. Use the <code>--multidelete</code> option, and pass it a path to a file. That file should contain <code>key</code> as the first line, followed by each address you want to delete, each on a new line.</p>

CC BY-SA 3.0
2015-01-12T07:29:13.937Z
Thanks, I've used piwallet, but is there a way to do this from command line, not Web interface?
Patrick Geyer
CC BY-SA 3.0
2015-01-12T07:38:37.863Z
@PatrickGeyer See edit.
Nick ODell
CC BY-SA 3.0
2015-01-12T07:39:51.933Z
This is exactly what I am looking for, thanks so much :)
Patrick Geyer
CC BY-SA 3.0
2015-01-12T21:20:00.313Z
What format should that file be? Is .txt okay?
Patrick Geyer
CC BY-SA 3.0
2015-01-12T22:33:36.530Z
@PatrickGeyer Yes.
Nick ODell
CC BY-SA 3.0
2015-01-11T18:41:29.967Z
2015-01-12T07:38:24.017Z
2015-01-12T07:38:24.017Z
Nick ODell
<p>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.</p>

<p>E.g. the acccount "Test" :</p>

<pre><code>Array (
[0] =&gt; 1JQQXBRrG5h7uW8StVtJRcGEdb4YYTqnas
[1] =&gt; 1LP8VeKDNKAgErCnYVAFvGMnrGbM3oHe6u
[2] =&gt; 1LwTx3a7hy4FZ5EJMxcPnRG9ap8AUwd2cm
[3] =&gt; 1AtbnW8dPuzp6jVnAvipiJR4o1BupCcU8D
[4] =&gt; 1K7FyNgmJ4ryjKgNz9ybxzQcYrGDEbYEUX
[5] =&gt; 1Ng77Nq1SF46MDZnz4pEirCEbbiHZ1Wthp
[6] =&gt; 175FKAiJSC9wA12BPcYZD6drTYLxXXChdZ
)
</code></pre>

<p>What if the user just wants to delete 1JQQXBRrG5h7uW8StVtJRcGEdb4YYTqnas?</p>

<p>Cheers!</p>

CC BY-SA 3.0
2015-01-11T17:46:10.970Z
Are you using the [accounts](http://bitcoin.stackexchange.com/questions/tagged/accounts) feature of bitcoind?
Nick ODell
CC BY-SA 3.0
2015-01-11T17:47:44.380Z
@NickODell I am :)
Patrick Geyer
CC BY-SA 3.0
2015-01-12T03:38:32.753Z
Do you want to delete the account, delete the address, or dis-associate the address from that account?
morsecoder
CC BY-SA 3.0
2015-01-25T16:55:55.720Z
@StephenM347 I'd like to delete an account!
Patrick Geyer
CC BY-SA 3.0
2015-01-25T17:02:29.613Z
@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
CC BY-SA 3.0
2015-01-25T17:10:06.343Z
@StephenM347 - I can now delete an address from an account.. But it still appears in the list of Bitcoin receiving addresses under the label (no label). Any advice on how to completely delete the address?
Patrick Geyer
CC BY-SA 3.0
2015-01-25T17:11:41.887Z
And I'm assuming label and account are the same thing - http://bitcoin.stackexchange.com/questions/4136/importprivkeys-label-is-it-the-same-as-an-account?rq=1
Patrick Geyer
CC BY-SA 3.0
2015-01-25T17:12:47.940Z
@PatrickGeyer, Yes, label and account are the same thing. Like Nick said in his answer, though, you can't delete the address itself.
morsecoder
CC BY-SA 3.0
2015-01-25T17:14:51.800Z
"You can also use PyWallet to delete addresses permanently" - I guess not quite, then. Thanks a lot Stephen :)
Patrick Geyer
<address><json-rpc><bitcoin-core-accounts>
How do you delete an account in Bitcoin Core?
Patrick Geyer
# How do you delete an account in Bitcoin Core?

(Asked by: username_0 on 2015-01-11)

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?

Cheers!

**Tags:** address, json-rpc, bitcoin-core-accounts

> **Comments:**
> **username_1**: Are you using the [accounts](http://bitcoin.stackexchange.com/questions/tagged/accounts) feature of bitcoind?  
> **username_0**: @username_1 I am :)  
> **username_2**: Do you want to delete the account, delete the address, or dis-associate the address from that account?  
> **username_0**: @StephenM347 I'd like to delete an account!  
> **username_2**: @username_0, 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.  
> **username_0**: @StephenM347 - I can now delete an address from an account.. But it still appears in the list of Bitcoin receiving addresses under the label (no label). Any advice on how to completely delete the address?  
> **username_0**: And I'm assuming label and account are the same thing - http://bitcoin.stackexchange.com/questions/4136/importprivkeys-label-is-it-the-same-as-an-account?rq=1  
> **username_2**: @username_0, Yes, label and account are the same thing. Like username_1 said in his answer, though, you can't delete the address itself.  
> **username_0**: "You can also use PyWallet to delete addresses permanently" - I guess not quite, then. Thanks a lot Stephen :)  

---

## 2 answers

### Answer by username_1 on 2015-01-11. Score: 4 | Accepted answer

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](https://github.com/jackjack-jj/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.

> **Comments:**
> **username_0**: Thanks, I've used piwallet, but is there a way to do this from command line, not Web interface?  
> **username_1**: @username_0 See edit.  
> **username_0**: This is exactly what I am looking for, thanks so much :)  
> **username_0**: What format should that file be? Is .txt okay?  
> **username_1**: @username_0 Yes.  

---

### Answer by username_3 on 2018-08-02. Score: 0

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>


---

