ubx destroy tears down all cloud resources in the current Pulumi stack by running pulumi destroy. The .ubx/ directory must exist — run ubx apply at least once first.
Usage
Examples
ubx destroy # prompt for confirmation
ubx destroy --force # skip confirmation prompt
ubx destroy --env prod # destroy prod stack
ubx destroy --target unit.aws_s3_bucket_v2.assets # specific resource only
Flags
| Flag | Description |
|---|
--force | Skip confirmation prompt |
--env string | Target environment |
--stack string | Target stack name |
--target stringArray | Target a specific resource (repeatable) |
Output
◆ Stack dev
─── Destroying ─────────────────────
- aws:s3:BucketV2 assets 2s
- aws:rds:Instance db 15s
✓ done in 18s · 0 created · 0 changed · 2 destroyed
Confirmation
By default ubx prompts before destroying:
⚠ This will destroy 2 resources in stack "dev".
Continue? [y/N]
Use --force to skip in CI/CD pipelines.
ubx destroy permanently deletes cloud resources. Resources with lifecycle { prevent_destroy = true } will be protected and cause an error.