Skip to main content

Documentation Index

Fetch the complete documentation index at: https://archie.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Deleting an environment removes its dedicated database, its credentials, and every per-environment configuration block. The action is permanent — the database can’t be recovered through normal channels — but backups outlive the environment and can be restored to recreate it.
Deletion drops the environment’s database and revokes its credentials. Anything not captured in a backup is gone. Take a manual backup before deleting if you might want the data back.

Restrictions

Three rules block deletion in the dashboard and the API:
RuleWhy
master cannot be deletedIt’s the root of the environment tree. Every project must have a baseline.
An environment with active children cannot be deletedIts children would lose their parent reference. Delete or archive the children first.
An environment in the middle of a merge cannot be deletedWait for the merge to complete (or cancel it) before deleting.

Deleting from the dashboard

1

Switch to a different environment

You can’t delete the environment you’re currently viewing. Switch to another active environment first.
2

Open the environment list

From the environment switcher dropdown, open the tree or list view.
3

Choose Delete on the target

The delete control surfaces a confirmation dialog with the environment’s name and a final warning.
4

Confirm by typing the name

Type the environment’s name to confirm — protection against accidental deletion of the wrong row.
5

Wait for the cleanup

Status moves to archived briefly while resources are decommissioned, then the environment disappears from the switcher.

What happens during deletion

The platform runs a cleanup sequence and removes the environment from the project hierarchy:
StepWhat it does
1. Permanent data removalThe dedicated PostgreSQL database is dropped. Database credentials are revoked.
2. Configuration cleanupAuth provider records, file storage providers, RBAC roles, custom API routes, environment variables, and security policies are removed.
3. API gateway removalAny custom API gateway routes scoped to the environment are decommissioned.
4. Platform unregistrationThe environment is removed from the project hierarchy. The environment context is no longer routable.
After deletion, the environment’s name is free to be reused — though we recommend not reusing it immediately, since clients with cached endpoints may still try to connect.

What survives deletion

Two things outlive a deleted environment:
  • Backups — both manual and pre-merge backups taken while the environment existed remain in the project’s Backups view. Restore one to recreate the environment. See Restoring to a deleted environment.
  • Migration history — entries in the project-level history remain. Audit trails don’t disappear when environments do.

Deleting via GraphQL

mutation DeleteEnvironment($input: DeleteEnvironmentInput!) {
  deleteEnvironment(input: $input) {
    success
    message
  }
}
{
  "input": {
    "projectId": "f7e4a264-d659-4719-91e8-c2d74654e529",
    "environmentName": "staging"
  }
}
The mutation enforces the same restrictions as the dashboard — master is rejected, environments with children are rejected, and environments in merging status are rejected. On success, the database and configuration are gone.

FAQ

Not as an undo. The environment’s database is dropped immediately. To recover, restore one of the backups taken while the environment existed — the platform recreates the environment as part of the restore. See Backups → Restoring to a deleted environment.
You can’t. The platform rejects deleting an environment with active children. Delete or archive the children first, then the parent. The tree view shows the children to handle.
All gone — they’re per-environment and cleaned up during deletion. Any external system using credentials issued for that environment will start failing immediately.
Archive is currently a transient state during deletion. Once a deletion completes, the environment disappears entirely.
Take a manual backup, mark it retain forever, then delete the environment. The backup keeps the data accessible for restore later, while the environment’s resources (database, gateway routes, etc.) are released.