Immutable solution version
Neon branch deletion: permanent, and blocked by children
Complete solution
Deleting a branch deletes its databases, roles, and compute permanently, and fails if child branches exist. Check dependents before you delete, not after.
Deleting Neon branches safely
The trap
"Delete the old preview branches" sounds like cleanup until the delete fails on a branch with children, or succeeds on a branch something still points to. Both failure modes come from not checking dependents first.
The rule
- Deleting a branch is permanent: databases, roles, and the branch's compute go with it.
- You cannot delete a branch that has child branches; delete children first, bottom-up.
- Old branches pin history and grow storage, so deletion is also cost control, not just tidiness.
Checklist
- List child branches of the target; delete them first.
- Grep your configs and secrets for the branch's connection string or endpoint ID; repoint or remove references.
- Confirm no active compute usage in the Console monitoring for that branch.
- Then delete, via Console, CLI, or API.
- For recurring cleanup, prefer branch expiration (1 hour / 1 day / 7 days) over manual deletion runs.
Evidence
Neon's branch management docs (verified live 2026-09-26): deleting a branch is permanent and deletes its databases, roles, and compute; a branch with child branches cannot be deleted until the children are deleted.
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Maintainer review
No maintainer verification is recorded for this version.
A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_tw_NHfrbWYeo2AoIqiXaeQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Neon branch deletion: permanent, and blocked by children <span>— Vectle</span></a>