I have a full node of Bitcoin Core wallet. I would like to know if it's possible to delete data after a certain block. For example Bitcoin is currently at block 504385. There was a fork around block 500000 and I would delete all block data after that so I can use the blockchain data I have with the new fork wallet.

1 Answer 1


You can't delete the block data themselves, but you can reset the blockchain state to a specific block by using the invalidateblock command. This command will mark a specific block and its descendants as invalid thus setting the chainstate to the block immediately before it. Note that this may not necessarily work to switch to a blockchain fork and may still not be able to use the forked blockchain.

If you want to go back to the 500,000th block, you would invalidate the 500,001st block with the call invalidateblock 0000000000000000005c9959b3216f8640f94ec96edea69fe12ad7dee8b74e92. By invalidating the 500,001st block the chainstate resets to height 500,000.

  • How do I make it go back to block 500000 with that commands? "invalidateblock 500000" ?
    – masterq
    Commented Jan 15, 2018 at 21:14
  • 4
    You would do invalidateblock 0000000000000000005c9959b3216f8640f94ec96edea69fe12ad7dee8b74e92. That will invalidate the 500001st block thus setting the chainstate to the block at height 500000.
    – Ava Chow
    Commented Jan 15, 2018 at 21:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.