<p>Since 0.14.0 the mempool is stored on disk when Bitcoin Core is closed. To apply <code>-zapwallettxes</code> to remove a transaction you also have to delete the <code>mempool.dat</code> as the transaction is otherwise reintroduced into the wallet when the mempool is imported. </p>

<p>To remove an unconfirmed transaction with 0.14.0 you have to:</p>

<ol>
<li>Shut down Bitcoin Core.</li>
<li>Find your <a href="https://bitcoin.stackexchange.com/q/4006/5406">Bitcoin directory</a></li>
<li>Delete <code>mempool.dat</code> in the Bitcoin directory</li>
<li>Start Bitcoin Core with <code>-zapwallettxes</code></li>
</ol>

<p>Previous versions didn't persist the mempool to disk, so step 1. and 4. are sufficient to remove an unconfirmed transaction.<br>
The interaction of <code>-zapwallettxes</code> and the persisted mempool was fixed with <a href="https://github.com/bitcoin/bitcoin/pull/10330" rel="nofollow noreferrer">Bitcoin Core 0.15.0</a>, so it is sufficient to set <code>-zapwallettxes</code> after that again.</p>

CC BY-SA 3.0
2017-06-08T18:52:16.040Z
Thank you so much Murch, But how do I delete mempool.dat      ?
Con John
CC BY-SA 3.0
2018-01-19T19:16:10.063Z
I don't have a mempool.dat!
Owl
CC BY-SA 3.0
2018-01-19T19:41:55.247Z
@Owl: And I don't have a Lambo. What's your point? ;) You might need to elaborate a bit what your question is, or if it exceeds what is sensibly treated in a comment section, ask another question and link it here. :)
Murch
CC BY-SA 3.0
2018-01-21T01:56:26.903Z
Hi Murch, you are correct, it wasn't a helpful comment, i've solved the problem and added an answer explaining how i solved it on older clients. It should work for newer clients also. I think i've also found out why the transactions stay in the mempool for much longer than 72 hours too.
Owl
CC BY-SA 4.0
2017-06-08T17:10:46.820Z
2018-07-01T22:22:33.233Z
2018-07-01T22:22:33.233Z
Murch
<p>Murch's answer is correct, but to save additional searches: please note that older bitcoin qt clients don't have a mempool.dat file. Please note also that bitcoin-qt - as i understand it is the old name for Bitcoin Core.</p>

<p>For example the latest bitcoin-qt client for gentoo even after a sync is v0.13.1.0, which is really old. I'm a bit apprehensive about compiling from non repository sources because the wallet has access to my private keys and there are several versions of bitcoin-qt source code on github, and i'm paranoid about running a compromised one. <strong>Gentoo maintainers: please update your bitcoin-qt client!!</strong></p>

<p>It is possible to check whether the transaction is stuck in the memory pool by right clicking on the transaction and clicking on "Show transaction details". If it's showing the transaction as in the memory pool with no confirmations, then proceed. If you have any confirmations, then stop now because it's already been sent.</p>

<p>Initially, I restarted bitcoin-qt -zapwallettxes. This removed my transaction out of the memory pool, however it was just re-added to the mempool when the client was restarted. So that's not the correct solution to the problem for older clients.</p>

<p>To stop the transaction from re-entering the mempool, i restarted bitcoin-qt from CLI with the option: <code>bitcoin-qt -mempoolexpiry=1</code> </p>

<p>What this option does, is it sets the transactions in the mempool to expire after 1 hour rather than the default 72 hours. Note that I had to keep bitcoin-qt running for over an hour to get the mempool to expire. If you restart the bitcoin-qt client within this time, it appears that the countdown resets and you have to wait another whole hour. Perhaps this explains why some people find that their transactions have been stuck in their mempool for weeks - they've for whatever reason restarted their bitcoin-qt client before the 72 hour countdown has finished. This certainly was the case for me.</p>

<p>After an hour, the transaction was still unconfirmed, but right clicking on the transaction then allowed me to abandon the transaction - this button was previously grayed out. </p>

<p>As soon as I clicked that my bitcoin balance was updated, a dustbin icon appeared next to the transaction and I've had no further issues.</p>

<p>Remember to set your -mempoolexpiry option back to the default 72 hours... </p>

<p>...or something more sane.</p>

CC BY-SA 3.0
2018-01-21T08:10:42.473Z
Now I understand your comment much better. ;) 
BTW, newer versions of Bitcoin Core will keep transactions for 14 days in their mempool instead of 72h, so it may be readded to your mempool by being broadcast from another node even after 72h have passed.
Murch
CC BY-SA 4.0
2018-06-25T14:38:39.820Z
Thanks for the information. This is quite a scary problem when you first come across it.
Owl
CC BY-SA 3.0
2018-01-21T01:23:31.403Z
2018-01-21T02:01:37.307Z
2018-01-21T02:01:37.307Z
Owl
<p>Can somebody please help me? I have been trying to send .045 Bitcoins (approx $120 USD)</p>

<p>I am using Bitcoin Core.</p>

<p>I have tried to get rid of the unconfirmed transaction by using -zapwallettxes  However.. when I re-boot Bitcoin Core v0.14.1 (64-bit)   without the zapwallet command.. it still shows as unconfirmed and now it appears to be stuck. I am afraid it is a duplicate transaction and I'll never get my Bitcoins back before now I am at 0 after reboot.. and even worse the address keeps telling me they haven't received anything... </p>

<p>What do I do?</p>

<bitcoin-core><unconfirmed-transactions><mempool>
How do I get rid of an unconfirmed transaction on Bitcoin Core 0.14.1?
Con John
# How do I get rid of an unconfirmed transaction on Bitcoin Core 0.14.1?

(Asked by: username_0 on 2017-06-08)

Can somebody please help me? I have been trying to send .045 Bitcoins (approx $120 USD)

I am using Bitcoin Core.

I have tried to get rid of the unconfirmed transaction by using -zapwallettxes However.. when I re-boot Bitcoin Core v0.14.1 (64-bit) without the zapwallet command.. it still shows as unconfirmed and now it appears to be stuck. I am afraid it is a duplicate transaction and I'll never get my Bitcoins back before now I am at 0 after reboot.. and even worse the address keeps telling me they haven't received anything...

What do I do?

**Tags:** bitcoin-core, unconfirmed-transactions, mempool


---

## 2 answers

### Answer by username_1 on 2017-06-08. Score: 4

Since 0.14.0 the mempool is stored on disk when Bitcoin Core is closed. To apply `-zapwallettxes` to remove a transaction you also have to delete the `mempool.dat` as the transaction is otherwise reintroduced into the wallet when the mempool is imported.

To remove an unconfirmed transaction with 0.14.0 you have to:

1. Shut down Bitcoin Core.
2. Find your [Bitcoin directory](https://bitcoin.stackexchange.com/q/4006/5406)
3. Delete `mempool.dat` in the Bitcoin directory
4. Start Bitcoin Core with `-zapwallettxes`

Previous versions didn't persist the mempool to disk, so step 1. and 4. are sufficient to remove an unconfirmed transaction.  
The interaction of `-zapwallettxes` and the persisted mempool was fixed with [Bitcoin Core 0.15.0](https://github.com/bitcoin/bitcoin/pull/10330), so it is sufficient to set `-zapwallettxes` after that again.

> **Comments:**
> **username_0**: Thank you so much username_1, But how do I delete mempool.dat      ?  
> **username_2**: I don't have a mempool.dat!  
> **username_1**: @username_2: And I don't have a Lambo. What's your point? ;) You might need to elaborate a bit what your question is, or if it exceeds what is sensibly treated in a comment section, ask another question and link it here. :)  
> **username_2**: Hi username_1, you are correct, it wasn't a helpful comment, i've solved the problem and added an answer explaining how i solved it on older clients. It should work for newer clients also. I think i've also found out why the transactions stay in the mempool for much longer than 72 hours too.  

---

### Answer by username_2 on 2018-01-21. Score: 1

username_1's answer is correct, but to save additional searches: please note that older bitcoin qt clients don't have a mempool.dat file. Please note also that bitcoin-qt - as i understand it is the old name for Bitcoin Core.

For example the latest bitcoin-qt client for gentoo even after a sync is v0.13.1.0, which is really old. I'm a bit apprehensive about compiling from non repository sources because the wallet has access to my private keys and there are several versions of bitcoin-qt source code on github, and i'm paranoid about running a compromised one. **Gentoo maintainers: please update your bitcoin-qt client!!**

It is possible to check whether the transaction is stuck in the memory pool by right clicking on the transaction and clicking on "Show transaction details". If it's showing the transaction as in the memory pool with no confirmations, then proceed. If you have any confirmations, then stop now because it's already been sent.

Initially, I restarted bitcoin-qt -zapwallettxes. This removed my transaction out of the memory pool, however it was just re-added to the mempool when the client was restarted. So that's not the correct solution to the problem for older clients.

To stop the transaction from re-entering the mempool, i restarted bitcoin-qt from CLI with the option: `bitcoin-qt -mempoolexpiry=1`

What this option does, is it sets the transactions in the mempool to expire after 1 hour rather than the default 72 hours. Note that I had to keep bitcoin-qt running for over an hour to get the mempool to expire. If you restart the bitcoin-qt client within this time, it appears that the countdown resets and you have to wait another whole hour. Perhaps this explains why some people find that their transactions have been stuck in their mempool for weeks - they've for whatever reason restarted their bitcoin-qt client before the 72 hour countdown has finished. This certainly was the case for me.

After an hour, the transaction was still unconfirmed, but right clicking on the transaction then allowed me to abandon the transaction - this button was previously grayed out.

As soon as I clicked that my bitcoin balance was updated, a dustbin icon appeared next to the transaction and I've had no further issues.

Remember to set your -mempoolexpiry option back to the default 72 hours...

...or something more sane.

> **Comments:**
> **username_1**: Now I understand your comment much better. ;)  BTW, newer versions of Bitcoin Core will keep transactions for 14 days in their mempool instead of 72h, so it may be readded to your mempool by being broadcast from another node even after 72h have passed.  
> **username_2**: Thanks for the information. This is quite a scary problem when you first come across it.  

---

