<p>Hello Michael Folkson,</p>
<p>Thanks for sharing insights on controlling disk usage during Bitcoin Core functional tests. To optimize space management, consider:</p>
<p><strong>Mounting /tmp with LVM</strong></p>
<p>Explore using Logical Volume Management (LVM) to mount /tmp, allocating dedicated space. This prevents /tmp from consuming root directory space, enhancing disk usage efficiency.</p>
<p>Implementing LVM provides flexibility and avoids potential issues related to space constraints on the root partition.</p>
<p>Incorporate this best practice for improved Bitcoin Core testing environment performance.</p>
<p>Best regards.</p>

CC BY-SA 4.0
2024-01-01T18:38:15.943Z
2024-01-01T18:38:15.943Z
ifuensan
<p>This was answered on <a href="https://twitter.com/sunitram/status/1457654478811828226?s=20" rel="nofollow noreferrer">Twitter</a> by various individuals.</p>
<p>You should remove the directory <code>/tmp/test_common_Bitcoin Core</code> regularly. For Martin Leitner-Ankerl this was 6GB of leftover files (leftovers only happen when tests fail or are canceled).</p>
<p>theStack also recommends running <code>rm -rf /tmp/bitcoin_func_test_*</code> every now and then.</p>
<p>The <code>/tmp</code> directory is usually only deleted at boot. It is uncommon on modern Linux distros for <code>/tmp</code> to be cleaned up automatically during runtime.</p>
<p>Occasionally (e.g. with the merge of <a href="https://github.com/bitcoin/bitcoin/pull/23371" rel="nofollow noreferrer">#23371</a>) you need to run <code>rm -rf ./test/cache</code> to force cache regeneration. In the #23371 case the pre-mined chain of the functional test framework changed and the functional tests using MiniWallet would fail (credit: theStack)</p>
<p>For general advice on compiling Bitcoin Core and running the tests see this <a href="https://jonatack.github.io/articles/how-to-compile-bitcoin-core-and-run-the-tests" rel="nofollow noreferrer">doc</a> from Jon Atack.</p>

CC BY-SA 4.0
2021-11-08T13:14:33.183Z
2021-11-11T12:48:37.110Z
2021-11-11T12:48:37.110Z
Michael Folkson
<p>What directories should I delete regularly to keep my disk usage under control when regularly running Bitcoin Core and the unit/functional tests?</p>

<bitcoin-core-development><storage-footprint><bitcoincore-review><functional-test>
How can I keep my disk usage under control when regularly running the Bitcoin Core functional tests?
Michael Folkson
# How can I keep my disk usage under control when regularly running the Bitcoin Core functional tests?

(Asked by: username_0 on 2021-11-08)

What directories should I delete regularly to keep my disk usage under control when regularly running Bitcoin Core and the unit/functional tests?

**Tags:** bitcoin-core-development, storage-footprint, bitcoincore-review, functional-test


---

## 2 answers

### Answer by username_0 on 2021-11-08. Score: 4 | Accepted answer

This was answered on [Twitter](https://twitter.com/sunitram/status/1457654478811828226?s=20) by various individuals.

You should remove the directory `/tmp/test_common_Bitcoin Core` regularly. For Martin Leitner-Ankerl this was 6GB of leftover files (leftovers only happen when tests fail or are canceled).

theStack also recommends running `rm -rf /tmp/bitcoin_func_test_*` every now and then.

The `/tmp` directory is usually only deleted at boot. It is uncommon on modern Linux distros for `/tmp` to be cleaned up automatically during runtime.

Occasionally (e.g. with the merge of [#23371](https://github.com/bitcoin/bitcoin/pull/23371)) you need to run `rm -rf ./test/cache` to force cache regeneration. In the #23371 case the pre-mined chain of the functional test framework changed and the functional tests using MiniWallet would fail (credit: theStack)

For general advice on compiling Bitcoin Core and running the tests see this [doc](https://jonatack.github.io/articles/how-to-compile-bitcoin-core-and-run-the-tests) from Jon Atack.


---

### Answer by username_1 on 2024-01-01. Score: -2

Hello username_0 username_0,

Thanks for sharing insights on controlling disk usage during Bitcoin Core functional tests. To optimize space management, consider:

**Mounting /tmp with LVM**

Explore using Logical Volume Management (LVM) to mount /tmp, allocating dedicated space. This prevents /tmp from consuming root directory space, enhancing disk usage efficiency.

Implementing LVM provides flexibility and avoids potential issues related to space constraints on the root partition.

Incorporate this best practice for improved Bitcoin Core testing environment performance.

Best regards.


---

