Using Bitcoind and Json-RPC, how can I remove an unconfirmed transaction from the memory pool?

The scenario being that I want to remove the unconfirmed transaction because it's not getting confirmed, and it's preventing me from sending new transactions spending the same inputs because Bitcoind considers it a double spend.


Try the removeprunedfunds RPC command. It

deletes the specified transaction from the wallet. … This will effect wallet balances.

  • don't know why you're voted down.. that did it for me
    – tobi
    Jun 14 '18 at 9:43
  • This is correct, but it should be noted that removeprunedfunds will remove the tx from just the local node's mempool and not necessarily from the mempool of other nodes that the tx may have propagated to.
    – A-Diddy
    Oct 4 at 17:22

There is no RPC command available to remove objects from the mempool.

  • 1
    outdated reply, see @Geremia's answer
    – tobi
    Jun 14 '18 at 10:59
  • Not really. Removal from wallet and removal from mempool are two distinct operations. Sep 17 '20 at 16:18

I haven't found a good way to clear just a single transaction from the mempool, but you can shutdown bitcoind and then delete ~/.bitcoin/mempool.dat and clear the entire mempool, and then restart bitcoind

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.