#Delete Preview Environments
1 messages · Page 1 of 1 (latest)
Hi @slate crown. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
The knowledge sources don't provide specific instructions or a ready-made GitHub Actions workflow for deleting Convex preview deployments. However, based on what is documented, here's what you can use:
Deleting a Preview Deployment via the Management API
Convex exposes a Management API endpoint to delete a deployment:
POST /deployments/:deployment_name/delete
You could call this endpoint in a GitHub Actions workflow (e.g., on a pull_request closed event) using curl or similar tooling.
What the docs say about automatic cleanup
Preview deployments are automatically cleaned up:
- 5 days after creation (or 14 days on the Professional plan), or
- When a new preview deployment with the same name is created (i.e., pushing to the same branch replaces the old one).
They can also be manually deleted from the Convex dashboard. [preview deployments]