Can the blk0001.dat and blk0002.dat files be deleted?

8

1

I have a Bitcoin installation on an SD card, and the blockchain files (blk0001.dat specifically) take up nearly 4 GB of disk space.

Can the blk0001.dat and blk0002.dat files be safely deleted to free up space on my SD card? Will the blockchain just be downloaded again next time I run my bitcoin client?

Josh

Posted 2012-08-30T17:14:33.537

Reputation: 493

2You can use a symlink to put the wallet.dat on your SD card while the rest of the data files are including the blockchain are on your hard drive, if you wish.Stephen Gornick 2012-08-31T08:23:37.770

Good idea @StephenGornick!Josh 2012-08-31T11:49:38.397

4It's a bad idea to symlink wallet.dat! If your client ever shuts down non-cleanly, you may end up with a corrupt wallet.Luke-Jr 2012-11-19T07:41:27.567

Answers

8

You can delete them just fine, as long as you delete blkindex.dat too. They will be downloaded and processed again. This will take a while, these days, though.

Pieter Wuille

Posted 2012-08-30T17:14:33.537

Reputation: 54 032

From my personal experience Days (About 1 hour for each week you are behind). This is for my 2.4 Ghz machine. Infinite patience. – None – 2014-11-08T08:30:45.237

Thanks! A while meaning hours... or weeks? :-)Josh 2012-08-30T17:30:49.617

1@Josh: YMMV but may be about a day. For this purpose you should consider trying a lightweight client.Meni Rosenfeld 2012-08-30T20:38:38.187