Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete Netlify deployed branch

Tags:

git

netlify

Scenario: A new branch is created and desired code changes applied. The branch is later deployed to Netlify with a custom (Branch) URL. After testing, pull request is made and a deploy-preview is also deployed on Netlify with another custom URL. Then, merge request is approved and successfully merged the branch is fully deleted.

Consequences: However, even then the deploy-preview and branch-deploy specific deploys remain up and published.

Question:

  • How does one remove (purge) branch-specific deploy from Netlify?
  • Bonus: How does one remove (purge) deploy-preview deploy from Netlify?
like image 584
Lukas Avatar asked Apr 15 '18 14:04

Lukas


1 Answers

Currently (04/16/2018) there is not a documented method to delete a specific deploy on Netlify. There are methods to stop a branch from being seen (see notes) that you can implement s part of your build workflow.

Contact support to have something sensitive removed.

NOTE:

  • Netlify adds an HTTP header x-robots-tag: noindex to the response headers on all Deploy Previews (built for a Pull Request), so those won't be indexed.
  • You can password protect branch deploys by selectively following: https://www.netlify.com/blog/2017/04/07/selective-password-protection/
    Note that it requires planning; you have to set this up before you deploy:
like image 96
talves Avatar answered Sep 28 '22 01:09

talves