<p>For portable devices there are variants of the Bitcoin client often dubbed "selfish clients" in that they do not download any portion of the block chain other than what pertains to their own specific addresses and transactions. To my knowledge, none of these variants has been fully developed into a desktop client, but it is likely that such projects are underway. Unless your system is literally lacking the hardware to accommodate these files, however, it is recommended that you use a non-selfish client version. The lightweight versions are called "selfish" for a reason - by only holding block chain data which pertains to your own transactions, you cannot pass anything but that data to other nodes and as such your client is of minimal (if any) use to the network.</p>

CC BY-SA 3.0
2011-09-04T19:57:52.007Z
Also, at the time of this writing, hard disk space is about $50 per TB which means the 500 MB block chain is costing you about 2.5 cents to store - "*selfish* client" may not be an overly nasty moniker after all.
David Perry
CC BY-SA 3.0
2011-09-06T02:20:29.643Z
For platter based disk space yes, but my main machine is SSD which is about $2 per GB compared to $0.6 per GB and at 60 GB you have to  keep on eye on it.  I also may wish to look into Point-of-sale devices that may be using simple 12GB or 16GB SSD's and it may be a consideration.
browep
CC BY-SA 3.0
2012-06-17T18:22:36.180Z
@DavidPerry What are the security risks in not having the entire Block Chain?
Pacerier
CC BY-SA 3.0
2012-06-17T19:21:08.770Z
@Pacerier to my knowledge there aren't any meaningful security risks, you simply have an incomplete dataset. As long as the dataset contains all the blocks which are pertinent to the addresses you're interested in (i.e. the ones you own) then there shouldn't be any issues.
David Perry
CC BY-SA 3.0
2012-06-17T19:24:32.650Z
@browep Most of the point-of-sale devices you're referencing already run credit card transactions through a server in a back room or via an attached embedded device anyway. Bitcoin has a built-in RPC mechanism for just such purposes, not to mention services like bitpay. It might not help save your expensive SSD, but you're an edge case - in almost every case either a) hard disk space is cheap or b) RPC/bitpay/ewallet is a better (and not unreasonable) option.
David Perry
CC BY-SA 3.0
2011-09-03T00:07:04.073Z
2011-09-03T00:07:04.073Z
David Perry
<p>If you want to use the standard client, currently there is no way to prune the blockchain data. However, you can try using a lightweight client (like <a href="http://multibit.org/" rel="nofollow noreferrer">MultiBit</a> or <a href="http://ecdsa.org/electrum/" rel="nofollow noreferrer">Electrum</a>), which offers similar security to the standard client (wallet.dat is stored on your computer), or an eWallet (like <a href="https://strongcoin.com/" rel="nofollow noreferrer">StrongCoin</a>, or even using <a href="https://mtgox.com/" rel="nofollow noreferrer">MtGox</a> if you don't need too much functionality), but then you have to trust that service.</p>

<p>The first two would reduce the disk space on your machine, but you'd still need to synchronize with the network; the second two would make you store nothing on computer and you would not need to synchronize.</p>

<p>There is work being done on a <a href="https://bitcointalk.org/index.php?topic=55842.180" rel="nofollow noreferrer">"Stratum client"</a>, which might offer the speed and minimal disk requirements of an eWallet with security of a lightweight client.</p>

<p>You can read more about various levels of security provided by different types of clients <a href="https://bitcoin.stackexchange.com/questions/2613/how-secure-are-various-models-of-bitcoin-clients">here</a>.</p>

CC BY-SA 3.0
2012-02-14T16:05:19.207Z
2012-02-14T18:52:48.683Z
2017-04-13T12:47:34.187Z
ThePiachu
<p>The short answer is: No.</p>

<p>The Bitcoin client requires the entire block chain in order to validate transactions, and the block chain is currently around 500MB. It will continue to get larger and larger over time.</p>

CC BY-SA 3.0
2011-09-03T13:51:40.277Z
2011-09-03T13:51:40.277Z
David Schwartz
<p><strong>NOTE: Do not use this solution.  It is no longer relevant for current clients. See other answers for suggestions on how to use incomplete blockchain representations.</strong> </p>

<p>The current version of the client doesn't offer much in the way of optimizing space, and does some caching that may cause bloat, but here are some ideas for manual ways that could help.</p>

<ol>
<li>Copy the wallet.dat file out of the data directory, then remove the data directory.  Restart the client have it build the data directory again and download the block chain. Stop the client replace the wallet.dat file with your backup. Restart the client with the -rescan option.</li>
<li>Backup your entire data directory and remove it. Start the client again creating a new data directory, and block chain download. Copy an address from the client. Close the client, backup the new data directory as a different backup.  Restore the old directory.  Start the client and transfer all of your coins to the new address.  You can then restore the number 2 backup of the data directory, and discard the old directory. In this scenario you do not need to restart the client with the -rescan option.</li>
</ol>

<p>However, be very careful with these steps, and keep all the backups until you are sure you are successful.  And remember that if you are expecting payments on the old wallet.dat file then you shouldn't use option two unless you can easily update the payment address to your new wallet.</p>

CC BY-SA 3.0
2014-10-07T22:26:54.240Z
I will leave this here for historical value, and to avoid a future duplicate of this answer, but it is no longer a relevant solution.  There may have been some inefficiencies  in an earlier client versions, but there is no evidence of that now.  As @lemonginger and others point out the block chain is what it is, any solution will involve not using the the full block chain.
Joshua Kolden
CC BY-SA 3.0
2011-09-03T04:32:55.420Z
Will that really help much in the way of space? The block chain is the block chain and it /is/ getting pretty big.
lemonginger
CC BY-SA 3.0
2011-09-03T00:39:28.617Z
2014-10-07T22:30:04.767Z
2014-10-07T22:30:04.767Z
Joshua Kolden
<p>You can use the -prune command when you execute the core.  This will strip down the blocks your client maintains to only the essential.  For me it has pared down the size of the btc Blocks folder by a third.</p>

<p>Add -prune to the end of your command line when you go to run the bitcoincore  executable</p>

<blockquote>
  <p>All command-line options (except for -conf) may be specified in a configuration file, and all configuration file options may also be specified on the command line. Command-line options override values set in the configuration file. </p>
</blockquote>

<p>You can also add -prune to end (outside the quotes) of the Target text in the properties of the bitcoincore GUI shortcut.</p>

CC BY-SA 4.0
2019-06-22T19:46:16.750Z
2019-06-22T19:46:16.750Z
ShefSam
<p>I don't believe you can, actually, which is one of Bitcoin's wee little problems, along with a too-long-gap between difficulty computations.</p>

<p>In order for Bitcoin to take over from the dollar, you'd have to have the entire economy of the USA on everyone's computer. That can't happen.</p>

<p>In order to fix that, we will have to modify the block chain system and that is DAMN DANGEROUS, because in spite of all the scandals around Bitcoin, Bitcoin itself is immutable, nothing has ever been found wrong with it's actual data structure itself.</p>

CC BY-SA 3.0
2011-09-03T16:16:31.573Z
In fact there have been vulnerabilities in core Bitcoin... see for example https://en.bitcoin.it/wiki/Incidents
Kiv
CC BY-SA 3.0
2011-09-03T16:10:48.253Z
2011-09-03T16:10:48.253Z
cdnbcguy
<p>The block chain file is getting rather large, ~500MB.  Is there a way to trim it or clean up, or maybe configure it to be limited in the future?  I am using the stock Bitcoin client on Ubuntu.</p>

<blockchain><client>
How do I reduce the size of the block chain data on my machine?
browep
# How do I reduce the size of the block chain data on my machine?

(Asked by: username_0 on 2011-09-02)

The block chain file is getting rather large, ~500MB. Is there a way to trim it or clean up, or maybe configure it to be limited in the future? I am using the stock Bitcoin client on Ubuntu.

**Tags:** blockchain, client


---

## 6 answers

### Answer by username_1 on 2011-09-03. Score: 13

For portable devices there are variants of the Bitcoin client often dubbed "selfish clients" in that they do not download any portion of the block chain other than what pertains to their own specific addresses and transactions. To my knowledge, none of these variants has been fully developed into a desktop client, but it is likely that such projects are underway. Unless your system is literally lacking the hardware to accommodate these files, however, it is recommended that you use a non-selfish client version. The lightweight versions are called "selfish" for a reason - by only holding block chain data which pertains to your own transactions, you cannot pass anything but that data to other nodes and as such your client is of minimal (if any) use to the network.

> **Comments:**
> **username_1**: Also, at the time of this writing, hard disk space is about $50 per TB which means the 500 MB block chain is costing you about 2.5 cents to store - "*selfish* client" may not be an overly nasty moniker after all.  
> **username_0**: For platter based disk space yes, but my main machine is SSD which is about $2 per GB compared to $0.6 per GB and at 60 GB you have to  keep on eye on it.  I also may wish to look into Point-of-sale devices that may be using simple 12GB or 16GB SSD's and it may be a consideration.  
> **username_2**: @username_1 What are the security risks in not having the entire Block Chain?  
> **username_1**: @username_2 to my knowledge there aren't any meaningful security risks, you simply have an incomplete dataset. As long as the dataset contains all the blocks which are pertinent to the addresses you're interested in (i.e. the ones you own) then there shouldn't be any issues.  
> **username_1**: @username_0 Most of the point-of-sale devices you're referencing already run credit card transactions through a server in a back room or via an attached embedded device anyway. Bitcoin has a built-in RPC mechanism for just such purposes, not to mention services like bitpay. It might not help save your expensive SSD, but you're an edge case - in almost every case either a) hard disk space is cheap or b) RPC/bitpay/ewallet is a better (and not unreasonable) option.  

---

### Answer by username_3 on 2012-02-14. Score: 8

If you want to use the standard client, currently there is no way to prune the blockchain data. However, you can try using a lightweight client (like [MultiBit](http://multibit.org/) or [Electrum](http://ecdsa.org/electrum/)), which offers similar security to the standard client (wallet.dat is stored on your computer), or an eWallet (like [StrongCoin](https://strongcoin.com/), or even using [MtGox](https://mtgox.com/) if you don't need too much functionality), but then you have to trust that service.

The first two would reduce the disk space on your machine, but you'd still need to synchronize with the network; the second two would make you store nothing on computer and you would not need to synchronize.

There is work being done on a ["Stratum client"](https://bitcointalk.org/index.php?topic=55842.180), which might offer the speed and minimal disk requirements of an eWallet with security of a lightweight client.

You can read more about various levels of security provided by different types of clients [here](https://bitcoin.stackexchange.com/questions/2613/how-secure-are-various-models-of-bitcoin-clients).


---

### Answer by username_4 on 2011-09-03. Score: 4

The short answer is: No.

The Bitcoin client requires the entire block chain in order to validate transactions, and the block chain is currently around 500MB. It will continue to get larger and larger over time.


---

### Answer by username_5 on 2011-09-03. Score: 3

**NOTE: Do not use this solution. It is no longer relevant for current clients. See other answers for suggestions on how to use incomplete blockchain representations.**

The current version of the client doesn't offer much in the way of optimizing space, and does some caching that may cause bloat, but here are some ideas for manual ways that could help.

1. Copy the wallet.dat file out of the data directory, then remove the data directory. Restart the client have it build the data directory again and download the block chain. Stop the client replace the wallet.dat file with your backup. Restart the client with the -rescan option.
2. Backup your entire data directory and remove it. Start the client again creating a new data directory, and block chain download. Copy an address from the client. Close the client, backup the new data directory as a different backup. Restore the old directory. Start the client and transfer all of your coins to the new address. You can then restore the number 2 backup of the data directory, and discard the old directory. In this scenario you do not need to restart the client with the -rescan option.

However, be very careful with these steps, and keep all the backups until you are sure you are successful. And remember that if you are expecting payments on the old wallet.dat file then you shouldn't use option two unless you can easily update the payment address to your new wallet.

> **Comments:**
> **username_6**: Will that really help much in the way of space? The block chain is the block chain and it /is/ getting pretty big.  
> **username_5**: I will leave this here for historical value, and to avoid a future duplicate of this answer, but it is no longer a relevant solution.  There may have been some inefficiencies  in an earlier client versions, but there is no evidence of that now.  As @username_6 and others point out the block chain is what it is, any solution will involve not using the the full block chain.  

---

### Answer by username_7 on 2019-06-22. Score: 0

You can use the -prune command when you execute the core. This will strip down the blocks your client maintains to only the essential. For me it has pared down the size of the btc Blocks folder by a third.

Add -prune to the end of your command line when you go to run the bitcoincore executable

> All command-line options (except for -conf) may be specified in a configuration file, and all configuration file options may also be specified on the command line. Command-line options override values set in the configuration file.

You can also add -prune to end (outside the quotes) of the Target text in the properties of the bitcoincore GUI shortcut.


---

### Answer by username_8 on 2011-09-03. Score: -3

I don't believe you can, actually, which is one of Bitcoin's wee little problems, along with a too-long-gap between difficulty computations.

In order for Bitcoin to take over from the dollar, you'd have to have the entire economy of the USA on everyone's computer. That can't happen.

In order to fix that, we will have to modify the block chain system and that is DAMN DANGEROUS, because in spite of all the scandals around Bitcoin, Bitcoin itself is immutable, nothing has ever been found wrong with it's actual data structure itself.

> **Comments:**
> **username_9**: In fact there have been vulnerabilities in core Bitcoin... see for example https://en.bitcoin.it/wiki/Incidents  

---

