Skip to Content
CLI Referencenkapp destroy

nkapp destroy

Stop and remove services and infrastructure. Also aliased as nkapp down.

nkapp destroy [services...] [options] nkapp down [services...] # alias

Arguments

ArgumentTypeDescription
servicesstring[]Optional list of service names. If omitted, destroys everything.

Options

FlagTypeDefaultDescription
-e, --env <env>stringlocalTarget environment
-v, --volumesbooleanfalseRemove associated persistent volumes
-y, --yesbooleanfalseSkip 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 worker

Full 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 -v or --volumes to explicitly prune associated persistent volumes (e.g. database data). Use nkapp clean for a total project wipe.