I have a 3 days old unconfirmed Bitcoin transaction that has 13 inputs, 2 outputs and a low fee.

I want to remove the small value inputs because as it increases the size, it also increases the minimum fee needed for the transaction to be confirmed and it's not worth to include them.


So I would like a transaction to replace the above one and only include these 2 inputs

  • 0.09980000 BTC (bc1q5mzf7fhs8h4vz28aerd464wsswxys9qalm63jj)
  • 0.00040000 BTC (bc1qgq84rlg2mgjz39cg8hqu0fz398830zk42lvcx5)

How can I achieve this using the Bitcoin Core Windows client console ?

Also, how about the low value inputs, are there anyways of consolidating them into a single wallet so I can make any use of them?


2 Answers 2


I think this should work (this is from just looking at the API, I have not tested this flow):

Use createrawtransaction to specify the two inputs you want to use and the recipient output. Use the resulting hex in fundrawtransaction with add_inputs: false to specify the fee_rate and automatically create a change output. Verify that the resulting transaction matches your intent. Then call signrawtransaction and sendrawtransaction.

If any of this gives you grief about the inputs already being spent, you may need to call abandontransaction on the transaction you’re trying to replace.

I think you could also use createrawtransaction to do it all, but in that case you need to explicitly define the change output (and to know the amount for the latter, manually calculate the appropriate fee).


Save these nodes in config and run bitcoin core with mempoolfullrbf=1:


Use walletcreatefundedpsbt to create a transaction with 2 inputs, 1 output and appropriate fee rate. Finalize and broadcast this transaction to replace earlier transaction.

  • 3
    The transaction already signals for RBF so there is no need for preferential peering. And walletcreatefundedpsbt would not re-spend coins already spent by an unconfirmed transaction. Commented May 10, 2023 at 7:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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