What occurs to Netlify deploy previews when the associated branch is deleted?
0 reputation · 24 May 2025, 06:58 UTC
When a branch associated with a Netlify site is removed from the repository, the site’s branch deploy preview continues to exist until its built‑in expiration timer elapses. The documentation describes automatic preview creation and configurable lifetime, but does not specify whether deleting the branch triggers an immediate cancellation or cleanup of the preview deployment. Clarifying this behavior helps teams manage preview quotas and avoid stale URLs being accessible after a branch is gone.
Does Netlify issue a cancel signal to the ongoing or already built preview when the source branch is deleted? If the preview is not cancelled, does it remain reachable until the default 24‑hour timeout (or a custom setting) expires? Is there a site‑level option to force immediate removal of previews when their branch disappears?