<p>Find the data directory: <a href="https://bitcoin.stackexchange.com/a/11210">https://bitcoin.stackexchange.com/a/11210</a></p>

<p>Create a file named "bitcoin.conf"</p>

<p>Add
    prune=550
to that file.</p>

<p>Restart Bitcoin Core.</p>

CC BY-SA 4.0
2019-01-23T14:05:43.593Z
I just did.  It did not seem to delete old blocks. Shall I manually delete some directories/files containing old blocks to start anew?
TooOldToLearn
CC BY-SA 4.0
2019-01-23T14:34:53.283Z
If you delete blocks manually, the database would be corrupted. Are you sure that it doesn't work? Could you please try adding random "asdasd" to bitcoin.conf to see if Bitcoin Core can see the conf file? If so, it'd crash. Otherwise, you might need to set "-datadir" option pointing to the directory with the conf file. BTW, make sure to calculate the size of the blocks directory, the number of files there might be misleading.
MCCCS
CC BY-SA 4.0
2019-01-23T15:18:18.047Z
i added asdasd and I think it does not see the config file, because it said it closed the database because no space left on device
TooOldToLearn
CC BY-SA 4.0
2019-01-23T10:24:20.307Z
2019-01-23T10:24:20.307Z
MCCCS
<p>I am following Antonopoulos' Mastering Bitcoin.  I have installed Bitcoin core and ran bitcoind for the first time. Although the book said it will remind me to create a configuration file, it did not.  It rapidly used up the disk space (I am running it on VM Ubuntu) and I had to interrupt it.  </p>

<p>I want to free up the used space and try again with configuration file, but I do not know what to do.</p>

<bitcoin-core>
how to free up disk space after running bitcoind for the first time?
TooOldToLearn
# how to free up disk space after running bitcoind for the first time?

(Asked by: username_0 on 2019-01-23)

I am following Antonopoulos' Mastering Bitcoin. I have installed Bitcoin core and ran bitcoind for the first time. Although the book said it will remind me to create a configuration file, it did not. It rapidly used up the disk space (I am running it on VM Ubuntu) and I had to interrupt it.

I want to free up the used space and try again with configuration file, but I do not know what to do.

**Tags:** bitcoin-core


---

## 1 answers

### Answer by username_1 on 2019-01-23. Score: 1

Find the data directory: <https://bitcoin.stackexchange.com/a/11210>

Create a file named "bitcoin.conf"

Add
prune=550
to that file.

Restart Bitcoin Core.

> **Comments:**
> **username_0**: I just did.  It did not seem to delete old blocks. Shall I manually delete some directories/files containing old blocks to start anew?  
> **username_1**: If you delete blocks manually, the database would be corrupted. Are you sure that it doesn't work? Could you please try adding random "asdasd" to bitcoin.conf to see if Bitcoin Core can see the conf file? If so, it'd crash. Otherwise, you might need to set "-datadir" option pointing to the directory with the conf file. BTW, make sure to calculate the size of the blocks directory, the number of files there might be misleading.  
> **username_0**: i added asdasd and I think it does not see the config file, because it said it closed the database because no space left on device  

---

