nkapp destroy
Stop and remove services and infrastructure. Also aliased as nkapp down.
nkapp destroy [services...] [options]
nkapp down [services...] # aliasArguments
| Argument | Type | Description |
|---|---|---|
services | string[] | Optional list of service names. If omitted, destroys everything. |
Options
| Flag | Type | Default | Description |
|---|---|---|---|
-e, --env <env> | string | local | Target environment |
-v, --volumes | boolean | false | Remove associated persistent volumes |
-y, --yes | boolean | false | Skip confirmation prompt |
Behavior
Selective Destruction
When service names are provided, only those containers are stopped and removed. Infrastructure and other services remain untouched.
nkapp destroy api workerFull Destruction
When no service names are provided, all services and project-level infrastructure are destroyed:
- All service containers are removed
- The project network is removed
- The gateway container is removed
- Infrastructure resources (cloud instances) are destroyed
Remote Support
For remote environments, Nanokit establishes an SSH tunnel before issuing destroy commands. The tunnel is cleaned up automatically after completion.
Examples
# Destroy everything in local
nkapp destroy -y
# Destroy specific services
nkapp destroy api -e stage
# Full teardown of staging
nkapp down -e stage -y[!CAUTION] Full destruction removes all containers and associated state. Persistent volumes are not removed by default. Use
-vor--volumesto explicitly prune associated persistent volumes (e.g. database data). Usenkapp cleanfor a total project wipe.