<p>There is no fixed expiration time for each node, but the default setting is 72 hours.</p>

<p><a href="https://bitcoin.stackexchange.com/a/43165/24926">https://bitcoin.stackexchange.com/a/43165/24926</a></p>

CC BY-SA 3.0
2016-06-24T13:23:57.640Z
2016-06-24T13:23:57.640Z
2017-04-13T12:47:32.940Z
inersha
<p>In my particular case (unconfirmed not broadcasted transaction in memory pool of bitcoin core 0.14.1) the only way to remove that transaction was to delete mempool.dat after wallet close.</p>

<p>So deleting mempool.dat effectively forces transactions to leave memory pool.</p>

CC BY-SA 3.0
2017-05-10T09:19:29.480Z
2017-05-10T09:19:29.480Z
Anton Krouglov
<p>As of Bitcoin Core 0.14.0, these are the ways a transaction can leave the mempool:</p>

<ul>
<li>The transaction was included in a block.</li>
<li>The transaction or one of its unconfirmed ancestors conflicts with a transaction that was included in a block.</li>
<li>The transaction was replaced by a newer version (see <a href="https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki" rel="noreferrer">BIP 125</a>).</li>
<li>The transaction was at the bottom of the mempool (when sorted by fee per size), the mempool had reached its size limit (see the <code>-maxmempool</code> option), and a new higher-fee transaction was accepted, evicting the bottom.</li>
<li>The transaction expired by timeout (by default 14 days after entering).</li>
</ul>

<p>Also, transactions that have left the mempool can always enter them again. For example, when they're part of the local wallet and get rebroadcast, or when they're received again over the network. Eviction does not imply a transaction is cancelled.</p>

<p>Since Bitcoin Core 0.14.0, the mempool is saved to disk, so it persists across restarts. In earlier versions a restart would also result in a wiped mempool.</p>

CC BY-SA 3.0
2016-06-25T01:04:50.847Z
How can one change the timeout?
Nick ODell
CC BY-SA 3.0
2016-06-25T10:10:09.353Z
Using -mempoolexpiry=N with N in hours.
Pieter Wuille
CC BY-SA 3.0
2017-05-13T19:27:06.383Z
I think the default timeout for transactions has been increased to 14 days, right?
Murch
CC BY-SA 3.0
2017-05-14T08:09:30.747Z
@Murch It seems like from 0.14, it's 14 days, according to [this reddit comment](https://www.reddit.com/r/Bitcoin/comments/69jywp/a_practical_guide_to_accidental_low_fee/dhj1e5f/?utm_content=permalink&utm_medium=front&utm_source=reddit&utm_name=Bitcoin).
nopara73
CC BY-SA 3.0
2017-05-16T15:22:49.047Z
@murch
Will evicted (or deleted) tx by timeout enter into mempool again?
zono
CC BY-SA 3.0
2017-05-16T15:27:20.393Z
@zono: Yes, if they are rebroadcast and exceed the minRelayTxFee that you require for transactions.
Murch
CC BY-SA 3.0
2016-06-24T23:48:09.203Z
2017-05-25T20:25:58.930Z
2017-05-25T20:25:58.930Z
Pieter Wuille
<p>How does my bitcoin core client know when to drop a transaction from the memory pool?</p>

<p>Is it as simple as a specific period of time?</p>

<unconfirmed-transactions><mempool>
How do transactions leave the memory pool?
inersha
# How do transactions leave the memory pool?

(Asked by: username_0 on 2016-06-24)

How does my bitcoin core client know when to drop a transaction from the memory pool?

Is it as simple as a specific period of time?

**Tags:** unconfirmed-transactions, mempool


---

## 3 answers

### Answer by username_2 on 2016-06-24. Score: 51 | Accepted answer

As of Bitcoin Core 0.14.0, these are the ways a transaction can leave the mempool:

* The transaction was included in a block.
* The transaction or one of its unconfirmed ancestors conflicts with a transaction that was included in a block.
* The transaction was replaced by a newer version (see [BIP 125](https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki)).
* The transaction was at the bottom of the mempool (when sorted by fee per size), the mempool had reached its size limit (see the `-maxmempool` option), and a new higher-fee transaction was accepted, evicting the bottom.
* The transaction expired by timeout (by default 14 days after entering).

Also, transactions that have left the mempool can always enter them again. For example, when they're part of the local wallet and get rebroadcast, or when they're received again over the network. Eviction does not imply a transaction is cancelled.

Since Bitcoin Core 0.14.0, the mempool is saved to disk, so it persists across restarts. In earlier versions a restart would also result in a wiped mempool.

> **Comments:**
> **username_3**: How can one change the timeout?  
> **username_2**: Using -mempoolexpiry=N with N in hours.  
> **username_4**: I think the default timeout for transactions has been increased to 14 days, right?  
> **username_5**: @username_4 It seems like from 0.14, it's 14 days, according to [this reddit comment](https://www.reddit.com/r/Bitcoin/comments/69jywp/a_practical_guide_to_accidental_low_fee/dhj1e5f/?utm_content=permalink&utm_medium=front&utm_source=reddit&utm_name=Bitcoin).  
> **username_6**: @username_4 Will evicted (or deleted) tx by timeout enter into mempool again?  
> **username_4**: @username_6: Yes, if they are rebroadcast and exceed the minRelayTxFee that you require for transactions.  

---

### Answer by username_0 on 2016-06-24. Score: 8

There is no fixed expiration time for each node, but the default setting is 72 hours.

<https://bitcoin.stackexchange.com/a/43165/24926>


---

### Answer by username_1 on 2017-05-10. Score: 1

In my particular case (unconfirmed not broadcasted transaction in memory pool of bitcoin core 0.14.1) the only way to remove that transaction was to delete mempool.dat after wallet close.

So deleting mempool.dat effectively forces transactions to leave memory pool.


---

