How to enable pruning on bitcoind

If you don’t want to have the whole bitcoin blockchain on your computer or server you don’t have to. There is an option that deletes previously verified blocks from your local copy. This is called pruning. To enable it you have to add the following line to your bitcoind config. This config file is usually in ‘/etc/bitcoin/bitcoin.conf’.

After that you have to restart bitcoind and 5 minutes later you have a whole lot more free diskspace.

You can check if pruning is enabled with:

It will output something like this:

Good to know:

The prune= value has to be higher than 550. And the number indicates the diskspace to be used in Megabytes. I went with 5000 because 5GB seemed reasonable to me.


After I enabled the prune=5000 option bitcoind wouldn’t start anymore. There was no usable error:

I checked for typo’s in the config file and read the logfile in /var/lib/bitcoin/debug.log but everything seemed fine. So I started the daemon by hand. This is usually a good approach to see what’s going on.

And there it is. You have to disable txindex in the bitcoin.conf to use pruning.