News & Announcements

Cleaning up deploys you no longer need

Now teams who want to clean up their outdated deploys can delete them from the Netlify app. To make your seasonal cleaning even easier, Netlify will also automatically delete failed or canceled deploys older than 6 months.

Deploys, rollbacks, and deletion

One of the most beloved benefits of Netlify is the ability to instantly revert to any prior version of your site or app with one-click rollbacks. One-click rollbacks make shipping a stress-free event, whether you’re pushing on a Monday morning or a Friday afternoon.

Underpinning the magic of one-click rollbacks is the infrastructure of atomic and immutable deploys. On Netlify, every deploy is an artifact that’s essentially a complete and functional snapshot of your site or app from a moment in time, and it cannot be changed. Your deploys list is like an interactive timeline showing the recent history of your project. You can jump back in time to any prior state on the list with the click of a button.

But, what if you shipped a version of your site that you never want to revisit? Or, perhaps an API token or some other sensitive data slipped into a deploy?

To give you peace of mind over old deploys, we’re giving Netlify team Owners and Collaborators the power to manually delete any deploy from the Netlify UI. This has been one of our most highly requested features, and we’re so glad to make it available to you and your team!

That said — erasing entire moments from your Netlify archive is serious business. You won’t be able to hop, skip, or jump back to a prior version of your project once the deploy artifact is gone.

Read on to learn more about how to delete deploys and what to expect as you clean up your account.

How to delete a deploy

Owners and Collaborators can find the option to delete a deploy on the deploy details page at Site > Deploys.

For failed or canceled deploys, you will find the “Delete deploy” button directly on the deploy summary card.

image

For deploys that previously succeeded, you’ll find the option to delete the deploy under Options.

image.

Considerations

Here’s what you need to know about deleting deploys:

  • Deleting a deploy is permanent and cannot be undone. We won’t put your deleted deploys in the recycling bin outside for a few days until they’re taken away from the curb forever. There’s no dumpster diving for deleted deploys. Only confirm a deploy deletion if you’re absolutely sure you’re ready to delete that specific deploy forever.
  • Once a deploy is deleted, all of the related artifacts for the deploy will disappear. You won’t be able to reference the deploy logs, visit the deploy URL, or run any functions bundled in that deploy.
  • If you delete the most recent successful deploy in a specific deploy context, that deploy context will roll back to the next most recent successful deploy in your deploy history.
  • If you delete the last or only deploy in a specific deploy context, that deploy context will no longer work. For example, if you have a deploy context configured for staging.yoursite.app and you delete the last deploy for the staging context, you won’t be able to visit staging.yoursite.app anymore. It will show a 404 error until you deploy a new version of your site with that context.
  • Split testing could be disrupted. If your A/B tests reference a deploy that has been deleted, that A/B test will no longer be able to route people to the deleted version and your results could become skewed.

Finally, it’s important to understand: deleting a deploy will not free up build minutes for billing purposes. Build minutes are metered as they occur, and deleting a deploy will not remove those build minutes from your usage counts or insights. The build will, however, be removed from the builds list on the Builds page in the Netlify UI.

At this point in time there is no way to delete deploys in bulk. Each deploy must be manually deleted individually with double-confirmation in the Netlify UI.

Learn more about considerations for deploy deletion in the docs.

Introducing automated deploy cleanup

Alongside the exciting release of manual deploy deletion, Netlify will also begin systematically deleting failed or canceled deploys older than 6 months.

Failed and canceled deploys are handy during active development, when you might need them to troubleshoot an issue. Once you’re confident you’ve fixed the issue, however, these deploy artifacts may become less valuable to your team.

Over time, these failed and canceled deployments can really add up! They can add more clutter to the timeline, and they also take up database space.

Being mindful of both the developer experience and also sustainability issues related to data storage, we’re introducing automated cleanup so we will only hold onto the deploys you need most.

A big thank you to the Netlify developer community

We’re so glad to give developers more control over cleaning up deploys in Netlify, and to take the first step toward a more reliable, sustainable future for deploy histories.

This feature was inspired by feedback from Netlify customers who requested the ability to delete deploys over time. Please keep the ideas coming!

If you have feedback specifically about deploy deletion for Netlify, we invite you to complete this open survey. For any and all other topics, we’d love to hear from you on our free Community Forums at: answers.netlify.com

Keep reading

Recent posts

How do the best dev and marketing teams work together?