Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Hyena on October 11, 2014, 01:02:15 PM



Title: Delete private key from wallet
Post by: Hyena on October 11, 2014, 01:02:15 PM
So here's my problem. I imported a private key that receives donations to my personal hot wallet. I am not allowed to spend money on that donations address but it is now stuck in my hot wallet! How can I remove the imported private key from my hot wallet? It renders my whole wallet useless because Bitcoin-core lacks coin control and whenever I try to spend money from my hot wallet the donations might also be used up in transactions.


Title: Re: Delete private key from wallet
Post by: CIYAM on October 11, 2014, 01:09:00 PM
Huh? Bitcoin-qt has had *coin-control* for a long time now.

Anyway - you can use pywallet to delete keys from your wallet (take a backup of your wallet first of course).


Title: Re: Delete private key from wallet
Post by: Hyena on October 11, 2014, 02:09:57 PM
Huh? Bitcoin-qt has had *coin-control* for a long time now.

Ok it has, just had to enable it. Anyway, I did not immediately see a possibility to permanently lock some address so that its funds would never be consumed by any transaction.

Anyway - you can use pywallet to delete keys from your wallet (take a backup of your wallet first of course).

That's what I feared. At least an RPC call should be available for deleting a private keys.


Title: Re: Delete private key from wallet
Post by: gmaxwell on October 11, 2014, 06:19:11 PM
We have intentionally not provided one because it is such a huge footgun and is almost never useful.  Use an external tool to edit the wallet. (which also helpfully makes clear the level of danger in such an operation)