Hi,
I deployed a specific branch on my project (cool feature) and I have deleted it in my repo AND in deploy settings.
But the deploy is still there
How do we delete a branch-deploy (not a deploy-preview) ?
Thanks
Hi,
I deployed a specific branch on my project (cool feature) and I have deleted it in my repo AND in deploy settings.
But the deploy is still there
How do we delete a branch-deploy (not a deploy-preview) ?
Thanks
Currently there is not a way to delete a deploy.
Thanks for your feedback. That’s not … confortable i would say.
Oh no, not sensible (got lucky thought, a warning would be great) but really not UX friendly I would say, not having the control on what you want or not to be published.
Even on Netlify side I think that would be great not to have VM’s hanging around for people who don’t need them.
Hey Matt,
The challenge is the way Netlify stores files - files’ contents are indexed/attached directly to the deploy object for the first deploy we see them in. And they are not “re-stored” with later deploys in our backing store. You can see we wouldn’t want to keep a zillion copies of jquery.js
around, right?
So, we really can’t remove deploys and ensure that your site will continue to work. Your best bet if you want to make sure it’s gone is to delete the site and recreate it. And FYI, we don’t use a per-site VM or really any single-site resources in our network architecture - for serving content we use a general cache that all of our sites share so there are no additional “resources” used in that cache by having old deploys around - it won’t be in the cache, unless people are repeatedly fetching that content (using the deploy-specific URL). So if it’s in cache then…well, it is being used and being served faster than if we had to repopulate the cache from our database again
But…most people don’t express a desire to delete deploys in the first place, so we haven’t really considered changing the feature before. Could you elaborate on your use case in wanting to remove it?
Thanks for your feedback.
Yes, I do believe it is quite a challenge to run a service like Netlify, no question.
Just to give you my usecase last week :
As a user experience, my 2 cts :
Some concerns that come to my mind :
What if I publish, by mistake, some sensible information ? I have to delete the whole site and recreate ?
What if, over the span of several month/years I published 50 branches ? I have 50 copies of my website on the internet ?
I have read that Netlify add a “no-index” header to those deploys but if Netlify make a mistake one day (everybody does) and I have suddenly 50 websites that Google considers as duplicate ? Sandbox. Really not great.
Please note
I discovered recently Netlify and I think it is great. Simple and straight to point (a blessing in the SSG exploding market)
This branch (or PR) deploy is a great feature, a great idea, really useful. But I wouldn’t use it anymore now knowing I cannot delete these “drafts”
Thanks
Matt
Since we can’t delete a deploy, here is a way to alleviate the case you don’t want to have the branch deploys.
Yes, I was thinking about testing this approach in the end. My only concern (I have to test) is that it forces us to update the dns for the subdomain (CNAME pointing to a random Netlify ID that will change with the new website)
You don’t even need to set DNS up - you could always use the netlify sitename (which you can also change to be something consistent like beta-mycompany.netlify.com
for each site you set up and then delete in sequence).
If you use Netlify’s DNS hosting, we’ll also automatically “do the right thing” for records like that and remove and recreate them for you to be correct.
I’ll try that, thanks
I’m facing the same problem,
I Just deleted the branch in bitbucket and still sub domain exist !!
and also tried to delete it’s DNS Records but it didn’t work “This is a system record that cannot be managed directly.”
Hi @Miggz. Welcome to our community!
Support can delete Netlify-created DNS records for you. Let us know the name of the site and the name of the record and we can take care of it. If you’re not comfortable posting that here, please mention that, and we’ll DM you.
If we still can’t delete deployments could at least unpublish a branch URL so it is not available?
I’ve be using a preview deploy but there appears to be issues with the role based gating not on main deploy. I want to stop anyone using the branch so they only have main available
I’d rather not start a new project but if that’s the only way…
cc @jonsully
That is the only way, Slim. Branch subdomains, are directly tied to deploys, and you can’t remove either without totally starting over.
Sorry I don’t have better news for you today.
@fool I went ahead a did it. It was relatively painless. I just had to enable the services like identity and copy my env vars.
Plus I totally love the new random URI of “festive hoover”
Sometimes our name generator is brilliant. And sometimes it is very stupid
Glad to hear you got this resolved!
Hi there,
Just to confirm: When we create a branch deploy or deploy preview, we can never take the site down that’s created by that? That branch will always be viewable and accessible at that site URL?
Hey @PopInnovate, yes, that is correct
Hi Jen,
I have a use case that I believe will likely effect others. All our past Deploy Previews have been indexed by search engines. Since discovering this we have updated our build config to write a Disallow robots.txt for the deploy-preview and branch-preview build contexts.
But every other deploy preview created before this change is still crawled and accessed, appearing in search results and thus diverting traffic from our production site.
Can you step us through your recommended approach to resolving this?
Thank you
Hey @digeverything,
That… should not be happening! Could you please share your Netlify url with us so we can take a look?