{"id":"ftl2-destroy-cleans-up-state-file","text":"The destroy script deletes the state file after a successful destroy or when the instance is already gone.","truth_value":"IN","source":"entries/2026/05/11/deployments-catbeez-destroy.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{"example":"# From ftl2-servercraft/scripts/neoforge.py\nasync def destroy(ftl, config, log):\n    if not ftl.state.has(config.name):\n        log(f\"{config.name}: No server in state file, nothing to destroy\")\n        return\n    resource = ftl.state.get(config.name)\n    label = resource.get(\"label\", config.name)\n    await ftl.local.community.general.linode_v4(label=label, state=\"absent\")\n    ftl.state.remove(config.name)"},"explanation":{"steps":[{"node":"ftl2-destroy-cleans-up-state-file","truth_value":"IN","reason":"premise"}]}}