<p>There are more details in the <a href="https://github.com/bitcoin/bitcoin/blob/v0.12.0/doc/release-notes.md" rel="noreferrer">release notes</a>.</p>
<blockquote>
<p>To enable block pruning set <code>prune=&lt;N&gt;</code> on the command line or in <code>bitcoin.conf</code>, where N is the number of MiB to allot for raw block &amp; undo data.</p>
<p>A value of 0 disables pruning. The minimal value above 0 is 550.</p>
</blockquote>
<p>Where 550 is the size in MB you want the node to occupy in your system.</p>
<p>The <code>bitcoin.conf</code> is in the <a href="https://bitcoin.stackexchange.com/q/4006/5406">Bitcoin data directory</a>, you can create a text file by the name there, if there isn't a <code>bitcoin.conf</code> yet.</p>

CC BY-SA 3.0
2016-10-12T07:35:17.223Z
@user42169: "The configuration file is not automatically created; you can create it using your favorite plain-text editor. By default, Bitcoin (or bitcoind) will look for a file named `bitcoin.conf` in the bitcoin data directory, but both the data directory and the configuration file path may be changed using the `-datadir` and `-conf` command-line arguments." –[Running Bitcoin: Bitcoin.conf Configuration File](https://en.bitcoin.it/wiki/Running_Bitcoin#Bitcoin.conf_Configuration_File). First hit when I searched for "Bitcoin.conf doesn't exist". ;)
Murch
CC BY-SA 3.0
2016-10-31T14:22:17.453Z
where should the bitcoin.conf file reside on a win10 / win7 machine?
Patoshi パトシ
CC BY-SA 3.0
2016-10-31T16:11:00.887Z
@duckx: I don't know.  If you don't find the answer in documentation, please ask a new question.
Nate Eldredge
CC BY-SA 3.0
2017-01-06T13:33:56.823Z
@duckx: [Where is the configuration file of Bitcoin-Qt kept?](http://bitcoin.stackexchange.com/q/11190/5406).
Murch
CC BY-SA 3.0
2016-03-07T04:27:23.460Z
2017-05-26T16:07:07.863Z
2020-06-16T11:10:03.350Z
Nate Eldredge
<p>there was a followup on what a pruning node could actually be good for. Well, one answer would be shop systems who do not want/cannot rely on third party APIs like blockchain.info for their payment processing. a prune node would allow to be run on say a cheap vps with low space, while checking mempool for incoming transactions to implement payments. it would also allow checking/signing messages using the clients rpc calls, and to a limited degree it could allow checking the balances of addresses. I personally think(and I proposed intelligent pruning as I call it back in 2013) bitcoin devs implemented it wrongly. My implementation suggestion back then was to prune coins from the blockchain that had already been spent. Current behavior is to verify coins in transactions back to coinbase(aka when they were mined), while it should be sufficient to keep the last say 120 blocks plus every unspent transaction. Since the client verifies all blocks it gets, it could rely on those coins to be verified, yet it wouldnt need to know any previous transactions the coins went through.</p>

CC BY-SA 3.0
2017-11-12T06:27:21.370Z
No, that's exactly what Bitcoin Core does. All unspent coins are kept for further verification, and everything else is deleted (apart from the last day or so, to help with reorganisations).
Pieter Wuille
CC BY-SA 3.0
2016-04-24T23:31:51.600Z
2016-04-24T23:31:51.600Z
John Deaux
<p>By setting the -prune option.</p>

<blockquote>
  <p>-prune=
         Reduce storage requirements by enabling pruning (deleting) of old
         blocks. This allows the pruneblockchain RPC to be called to
         delete specific blocks, and enables automatic pruning of old
         blocks if a target size in MiB is provided. This mode is
         incompatible with -txindex and -rescan. Warning: Reverting this
         setting requires re-downloading the entire blockchain. (default:
         0 = disable pruning blocks, 1 = allow manual pruning via RPC,
  550 = automatically prune block files to stay under the
         specified target size in MiB)</p>
</blockquote>

<p>The feature was originally introduced in Bitcoin Core 0.11 (see <a href="https://github.com/bitcoin/bitcoin/blob/v0.11.0/doc/release-notes.md#block-file-pruning" rel="noreferrer">release notes</a>).</p>

<p>As of version 0.12 pruning can be used while running a wallet. But note the -txindex and -rescan caveats.</p>

<p>Also note that the specified MiB will only include the block files and some undo space. Besides that you will also need some disk space for the chain state and block index databases.</p>

CC BY-SA 3.0
2015-05-21T16:30:05.753Z
The argument to pruning is how much disk space to use for blocks and undo data associated with them. It does not include and does not apply to the chain state or block index databases. Do not increase the number to account for them.
Pieter Wuille
CC BY-SA 3.0
2015-05-22T09:48:22.557Z
@PieterWuille That's why i *decreased* the number for him. In another question he mentioned he had 35GB diskspace. :) But thanks for the addition, you're right that my answer was a bit ambiguous.
Jannes
CC BY-SA 3.0
2016-01-28T13:23:21.893Z
Well, if it disables the wallet funcionality, what would someone do with this node? Just mining? If so, in the event of successfully mining, what would be the destination of the generated bitcoin reward?
Henrique Barcelos
CC BY-SA 3.0
2016-01-28T17:28:16.827Z
@HenriqueBarcelos The upcoming version WILL allow running a wallet on a pruning node. The current version was just a stepping stone. As a side effect it made sure noone could possibly lose money due to a bug as there was no wallet at all. There are uses for (pruning) full nodes without wallet. For example you can use it as sort of a "firewall" between some internal application that you write yourself but that you don't want to directly hook up to the internet or possibly evil P2P traffic. Or to connect your Android wallet to it, so you are doing full validation, just not on the phone itself.
Jannes
CC BY-SA 3.0
2016-02-21T12:58:16.080Z
0.12.0 enables wallet support, you might want to update this answer. :)
Murch
CC BY-SA 4.0
2018-07-06T23:13:59.167Z
This answer needs to be updated. Pruning no longer disables wallet support and %u must be at least a minimum value according to the current parameter description
Willtech
CC BY-SA 4.0
2015-05-21T10:44:47.500Z
2019-01-28T10:33:53.923Z
2019-01-28T10:33:53.923Z
Jannes
<p>I read <a href="https://bitcoin.stackexchange.com/questions/37494/blockchain-over-36gb-and-causing-disk-space-issues/37495#comment43927_37495">this comment</a>:</p>

<blockquote>
  <p>You could consider running a pruning node, which is practically the
  same as a full node (including security), except it throws away some
  of the old history. Version 0.11 will make that possible</p>
</blockquote>

<p>But I can't find details of how to run <code>bitcoind</code> in pruning mode. Questions on <a href="https://bitcoin.stackexchange.com/questions/19920/how-explicitly-can-the-blockchain-be-pruned">this</a> <a href="https://bitcoin.stackexchange.com/questions/21126/will-old-accepted-blocks-ever-be-removed">site</a> seem not to be recent enough to yield answers, and I also don't see a pruning mode in the <a href="https://en.bitcoin.it/wiki/Running_Bitcoin">bitcoind parameters</a>.</p>

<p>Any insights into this?</p>

CC BY-SA 3.0
2015-05-21T09:28:20.560Z
as the comment said, this feature is not yet available in bitcoind.
Luca Matteis
CC BY-SA 3.0
2015-05-21T09:57:39.440Z
Ahhh I see, I didn't know 0.11 is a future version. Thanks for clarifying!
user
<bitcoind><blockchain><pruning>
How can I run bitcoind in pruning mode?
user
# How can I run bitcoind in pruning mode?

(Asked by: username_0 on 2015-05-21)

I read [this comment](https://bitcoin.stackexchange.com/questions/37494/blockchain-over-36gb-and-causing-disk-space-issues/37495#comment43927_37495):

> You could consider running a pruning node, which is practically the
> same as a full node (including security), except it throws away some
> of the old history. Version 0.11 will make that possible

But I can't find details of how to run `bitcoind` in pruning mode. Questions on [this](https://bitcoin.stackexchange.com/questions/19920/how-explicitly-can-the-blockchain-be-pruned) [site](https://bitcoin.stackexchange.com/questions/21126/will-old-accepted-blocks-ever-be-removed) seem not to be recent enough to yield answers, and I also don't see a pruning mode in the [bitcoind parameters](https://en.bitcoin.it/wiki/Running_Bitcoin).

Any insights into this?

**Tags:** bitcoind, blockchain, pruning

> **Comments:**
> **username_1**: as the comment said, this feature is not yet available in bitcoind.  
> **username_0**: Ahhh I see, I didn't know 0.11 is a future version. Thanks for clarifying!  

---

## 3 answers

### Answer by username_7 on 2015-05-21. Score: 40 | Accepted answer

By setting the -prune option.

> -prune=
> Reduce storage requirements by enabling pruning (deleting) of old
> blocks. This allows the pruneblockchain RPC to be called to
> delete specific blocks, and enables automatic pruning of old
> blocks if a target size in MiB is provided. This mode is
> incompatible with -txindex and -rescan. Warning: Reverting this
> setting requires re-downloading the entire blockchain. (default:
> 0 = disable pruning blocks, 1 = allow manual pruning via RPC,
> 550 = automatically prune block files to stay under the
> specified target size in MiB)

The feature was originally introduced in Bitcoin Core 0.11 (see [release notes](https://github.com/bitcoin/bitcoin/blob/v0.11.0/doc/release-notes.md#block-file-pruning)).

As of version 0.12 pruning can be used while running a wallet. But note the -txindex and -rescan caveats.

Also note that the specified MiB will only include the block files and some undo space. Besides that you will also need some disk space for the chain state and block index databases.

> **Comments:**
> **username_6**: The argument to pruning is how much disk space to use for blocks and undo data associated with them. It does not include and does not apply to the chain state or block index databases. Do not increase the number to account for them.  
> **username_7**: @username_6 That's why i *decreased* the number for him. In another question he mentioned he had 35GB diskspace. :) But thanks for the addition, you're right that my answer was a bit ambiguous.  
> **username_8**: Well, if it disables the wallet funcionality, what would someone do with this node? Just mining? If so, in the event of successfully mining, what would be the destination of the generated bitcoin reward?  
> **username_7**: @username_8 The upcoming version WILL allow running a wallet on a pruning node. The current version was just a stepping stone. As a side effect it made sure noone could possibly lose money due to a bug as there was no wallet at all. There are uses for (pruning) full nodes without wallet. For example you can use it as sort of a "firewall" between some internal application that you write yourself but that you don't want to directly hook up to the internet or possibly evil P2P traffic. Or to connect your Android wallet to it, so you are doing full validation, just not on the phone itself.  
> **username_3**: 0.12.0 enables wallet support, you might want to update this answer. :)  
> **username_9**: This answer needs to be updated. Pruning no longer disables wallet support and %u must be at least a minimum value according to the current parameter description  

---

### Answer by username_2 on 2016-03-07. Score: 20

There are more details in the [release notes](https://github.com/bitcoin/bitcoin/blob/v0.12.0/doc/release-notes.md).

> To enable block pruning set `prune=<N>` on the command line or in `bitcoin.conf`, where N is the number of MiB to allot for raw block & undo data.
>
> A value of 0 disables pruning. The minimal value above 0 is 550.

Where 550 is the size in MB you want the node to occupy in your system.

The `bitcoin.conf` is in the [Bitcoin data directory](https://bitcoin.stackexchange.com/q/4006/5406), you can create a text file by the name there, if there isn't a `bitcoin.conf` yet.

> **Comments:**
> **username_3**: @user42169: "The configuration file is not automatically created; you can create it using your favorite plain-text editor. By default, Bitcoin (or bitcoind) will look for a file named `bitcoin.conf` in the bitcoin data directory, but both the data directory and the configuration file path may be changed using the `-datadir` and `-conf` command-line arguments." –[Running Bitcoin: Bitcoin.conf Configuration File](https://en.bitcoin.it/wiki/Running_Bitcoin#Bitcoin.conf_Configuration_File). First hit when I searched for "Bitcoin.conf doesn't exist". ;)  
> **username_4**: where should the bitcoin.conf file reside on a win10 / win7 machine?  
> **username_2**: @duckx: I don't know.  If you don't find the answer in documentation, please ask a new question.  
> **username_3**: @duckx: [Where is the configuration file of Bitcoin-Qt kept?](http://bitcoin.stackexchange.com/q/11190/5406).  

---

### Answer by username_5 on 2016-04-24. Score: 2

there was a followup on what a pruning node could actually be good for. Well, one answer would be shop systems who do not want/cannot rely on third party APIs like blockchain.info for their payment processing. a prune node would allow to be run on say a cheap vps with low space, while checking mempool for incoming transactions to implement payments. it would also allow checking/signing messages using the clients rpc calls, and to a limited degree it could allow checking the balances of addresses. I personally think(and I proposed intelligent pruning as I call it back in 2013) bitcoin devs implemented it wrongly. My implementation suggestion back then was to prune coins from the blockchain that had already been spent. Current behavior is to verify coins in transactions back to coinbase(aka when they were mined), while it should be sufficient to keep the last say 120 blocks plus every unspent transaction. Since the client verifies all blocks it gets, it could rely on those coins to be verified, yet it wouldnt need to know any previous transactions the coins went through.

> **Comments:**
> **username_6**: No, that's exactly what Bitcoin Core does. All unspent coins are kept for further verification, and everything else is deleted (apart from the last day or so, to help with reorganisations).  

---

