How can I delete the head block stored in tezos-node storage?

I did something dumb - I modified the Octez code and then ran the modified tezos-node while pointing at the directory I use for my archive node. The modified tezos-node updated the head but it saved it with bad metadata, which means the hash-chain is broken and so the chain can't grow.

Is it possible to just delete the last block in the chain, as stored on disk? I looked at the commands for tezos-admin-client but didn't find anything.


  • best to just re-import a snapshot; that way you know for sure it's consistent
    – utdrmac
    Nov 3, 2021 at 19:54
  • You can't use snapshots for archive nodes, and it took me 3 weeks to sync this archive node 😭 Nov 3, 2021 at 22:07
  • Yea, archive nodes suck to create. Best to make one and then back it up somewhere.
    – utdrmac
    Nov 5, 2021 at 2:14

1 Answer 1


There is currently no way to do such a thing. However, if the block is "just an alternative head", new blocks with better fitness should be considered and the node should switch to another branch. It depends on how it is broken.

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.