# @architect/destroy

> Destroy projects created with Architect

Latest version **6.0.1** (published 2025-11-28) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @architect/destroy
pnpm add @architect/destroy
yarn add @architect/destroy
bun add @architect/destroy
```

Provides the command `arc-destroy`.

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 6.0.1 |
| Published | 2025-11-28 |
| First published | 2020-06-22 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=22 |
| Dependencies | 7 |
| Unpacked size | 18.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | brianleroux, dam, kborchers, ryanblock, architectci, filmaj |

## Links

- npm: https://www.npmjs.com/package/@architect/destroy
- Repository: https://github.com/architect/destroy
- Homepage: https://github.com/architect/destroy#readme
- Issues: https://github.com/architect/destroy/issues
- npm.io page: https://npm.io/package/@architect/destroy

## Dependencies (7)

- [@aws-lite/s3](https://npm.io/package/@aws-lite/s3.md) ^0.2.6
- [@aws-lite/ssm](https://npm.io/package/@aws-lite/ssm.md) ^0.2.3
- [@architect/utils](https://npm.io/package/@architect/utils.md) ~6.0.1
- [@aws-lite/client](https://npm.io/package/@aws-lite/client.md) ^0.23.2
- [@architect/inventory](https://npm.io/package/@architect/inventory.md) ~6.0.0
- [@aws-lite/cloudformation](https://npm.io/package/@aws-lite/cloudformation.md) ^0.1.3
- [@aws-lite/cloudwatch-logs](https://npm.io/package/@aws-lite/cloudwatch-logs.md) ^0.1.0

## Recent versions

- 6.0.1 (latest) — 2025-11-28
- 6.0.0-RC.0 (RC) — 2025-11-25
- 6.0.0 — 2025-11-27
- 5.0.2 — 2025-11-10
- 5.0.1 — 2025-09-25
- 5.0.0 — 2025-09-24
- 4.2.1-RC.1 — 2025-09-23
- 4.2.1-RC.0 — 2025-09-23
- 4.2.0 — 2025-09-10
- 4.1.0 — 2025-09-03
- 4.0.5 — 2024-04-29
- 4.0.4 — 2024-03-25
- 4.0.3 — 2024-03-25
- 4.0.2 — 2024-02-08
- 4.0.1 — 2024-02-05
- … 54 more at https://npm.io/package/@architect/destroy/versions

## README

[<img src="https://assets.arc.codes/architect-logo-500b@2x.png" width=500>](https://www.npmjs.com/package/@architect/destroy)

## [`@architect/destroy`](https://www.npmjs.com/package/@architect/destroy)

> Architect serverless framework module for destroying projects created with Architect

[![GitHub CI status](https://github.com/architect/destroy/workflows/Node%20CI/badge.svg)](https://github.com/architect/destroy/actions?query=workflow%3A%22Node+CI%22)

Architect Destroy destroys Architect-generated projects. More specifically, it destroys your projects' CloudFormation Stacks, CloudWatch Log Groups, S3 bucket used during deployment, SSM Parameters added by [`arc env`](https://github.com/architect/env), and if called with `--force` (or the `force` param via API), destroys your DynamoDB (`@tables`) databases and S3 bucket housing your static assets (`@static`).

## Testing

This project uses Node.js's native test runner (`node:test`) for all testing. The test suite includes unit tests and integration tests.

### Running Tests

```bash
# Run linter and unit tests
npm test

# Run only unit tests
npm run test:unit

# Run only integration tests
npm run test:integration

# Run tests with coverage report
npm run coverage
```

### Test Structure

Tests are organized in the `test/` directory:
- `test/unit/` - Unit tests for individual modules
- `test/integration/` - Integration tests for end-to-end scenarios
- `test/helpers/` - Shared test utilities and mock helpers

For detailed information about writing tests, mock patterns, and testing best practices, see [TESTING.md](./TESTING.md).

## API

### `destroy({ appname, stackname, env, force, now, retries, credentials, quiet, region }, callback)`

Destroys all infrastructure associated to your Architect app.

- `appname`: the name of the Architect app in question as defined in your `app.arc` file.
- `stackname`: the custom stack name (if specified during deployment, e.g. `arc deploy --name foo`)
- `env`: the stage or environment name to destroy, typical values are `staging` or `production`
- `force` proceeds to destroy your app even if it contains DynamoDB tables and / or an S3 bucket containing `@static` assets.
- `now`: (boolean) immeditely destroy the app (instead of waiting the requisite 5 seconds)
- `retries`: while waiting for a CloudFormation Stack to be destroyed, how many
    times do we ping the CloudFormation API checking if the Stack has been
    removed? This API is pinged every 10 seconds. If `retries` is exhausted,
    `callback` will be invoked with an error.
- `credentials`: (object) AWS credentials object with `accessKeyId`, `secretAccessKey`, and optionally `sessionToken`
- `quiet`: (boolean) suppress status output during destruction
- `region`: (string) provide region override

---
_Source: https://npm.io/package/@architect/destroy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
