Destroying Environments

Uninstall an environment to destroy all infrastructure resources it provisioned

Overview

Uninstalling an environment triggers a destroy run that removes all infrastructure resources previously provisioned by that environment. Like a deploy run, the destroy run follows the plan-approve-apply lifecycle: Bluebricks generates a destroy plan for you to review before any resources are deleted.

book

For background on how runs work, see Runs. For creating environments, see Creating Environments.

How to uninstall from the Bluebricks app

1

Step 1: Open the environments page

Navigate to Environments and find the environment you want to destroy.

2

Step 2: Start the uninstall

Click the three-dot menu on the environment row and select Uninstall.

3

Step 3: Confirm

A dialog asks you to confirm: "This will generate a plan to destroy the infrastructure resources previously provisioned by this environment. Are you sure you want to proceed?" Click Uninstall to continue.

4

Step 4: Review the destroy plan

Bluebricks generates a destroy plan and opens the run detail page. The plan shows all resources that will be removed. Review the changes carefully.

5

Step 5: Approve and apply

Click Approve & Apply to execute the destroy plan. The button appears in red for uninstall runs as a visual reminder.

circle-exclamation

How to uninstall via the CLI

Prerequisites: Bricks CLI installed and authenticated. See Bricks CLI.

bricks uninstall --env-slug my-postgres-db --collection production --plan-only

Review the plan in the Bluebricks app, then approve to proceed.

Uninstall by environment slug

bricks uninstall --env-slug my-postgres-db --collection production

Uninstall by package name

If multiple environments exist for the same package, the CLI prompts you to select one.

Key flags

Flag
Description

--env-slug

Environment slug to destroy

-c, --collection

Target collection

--plan-only

Generate a destroy plan without applying

For the full command reference, see bricks uninstall.

What happens during uninstall

  1. Bluebricks creates a destroy plan showing all resources to be removed

  2. Resources are destroyed in reverse dependency order (child packages first)

  3. The plan requires approval before execution, unless the environment is configured to auto-approve

  4. Once complete, the environment moves to an uninstalled state

Important considerations

  • Back up critical data before destroying (databases, configuration files, logs)

  • Destroy child environments first when environments depend on shared resources (e.g., destroy the app service before the VPC)

  • Check for resources outside Bluebricks management: persistent storage volumes, external DNS records, and manually created firewall rules may require manual cleanup in your cloud console

  • Production collections: if the collection has an Owner Approval policy, a designated owner must approve the destroy plan

See also

Last updated

Was this helpful?