In Ethereum you can implement a selfdestruct opcode in a smart contract to remove its code from the blockchain and free up storage space.
Is there an equivalent on Tezos ?
Tezos Stack Exchange is a question and answer site for users, experts, and developers of the Tezos blockchain project. It only takes a minute to sign up.Sign up to join this community
No, Tezos doesn't have such an instruction currently.
You can find the available instructions here.
The main benefit of such an instruction would be an automatic transfer of existing resources and tokens to a heir contract. However, the current Tezos token contracts do not seem to support "inheritance".
It also would allow to save space for the contract storage, but this is secondary issue as compared to the safety of resources.
Without such a special support of inheritance by token contracts, any blocked contract would also start burning all funds sent to it. This is also a problem with Ethereum's
If you want your contract to enter final state, where it no longer accepts any interaction, please still accept requests to withdraw funds if it keeps any.