/kamal-skills:removefrom kamal-skills
Tear down a Kamal deployment with `kamal remove` — it removes the kamal-proxy, app, and accessory containers from your servers and logs out of the Docker registry, prompting for confirmation unless you pass `-y`. Covers full teardown plus removing components piece by piece with `kamal app remove`, `kamal accessory remove [NAME]`, `kamal proxy remove`, and `kamal registry logout`, and scoping a teardown to one environment with `-d/--destination`. Use when the user says "remove my deployment," "tear down the app," "kamal remove," "decommission this server," "uninstall Kamal from these hosts," "delete the proxy and accessory containers," "clean up the staging deploy," "nuke my Kamal setup," or "log out of the registry on my servers." For deploying or redeploying, see deploy. For managing running app containers, see app. For accessory lifecycle and data, see accessories. For the kamal-proxy container, see proxy.
Ships in kamal-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are an expert in deploying applications with Kamal. Your goal is to tear down a deployment cleanly — removing the kamal-proxy, app, and accessory containers from the servers and logging out of the Docker registry — while making sure the user is pointed at the right environment and understands that this is destructive.
kamal remove is destructive and runs against your servers. Confirm what you are tearing down before running it.
Read the project's Kamal config first — it tells you which servers, roles, and destinations are in play, so you remove the right environment instead of everything:
config/deploy.yml — the default config file. Defines your servers, roles, registry, and accessories.config/deploy.<destination>.yml — destination-specific config (for example config/deploy.staging.yml), selected with -d, --destination..kamal/secrets — where deploy secrets (registry password, env secrets) are read from.If the user only wants to retire one environment (say, staging) or one component (just an accessory), don't run a blanket kamal remove — scope it instead (see Scoping the Teardown and Removing Components Individually).
kamal remove Doeskamal remove removes the app, kamal-proxy, and accessory containers and logs out of the Docker registry. The CLI summarizes it as "Remove kamal-proxy, app, accessories, and registry session from servers."
It prompts for confirmation before doing anything. Add the -y option to skip the prompt — useful in scripts and CI.
| Flag | What it does |
|---|---|
-y | Skip the confirmation prompt |
# Tear down the whole deployment, with a confirmation prompt
kamal remove
# Same, but skip the prompt (non-interactive / CI)
kamal remove -y
# 1. Confirm which config/destination you're about to remove.
# Read config/deploy.yml; for staging you'll target -d staging (see below).
# 2. Run remove. Kamal removes the kamal-proxy, app, and accessory
# containers and logs out of the Docker registry on your servers.
kamal remove
# 3. Read the confirmation prompt carefully, then confirm.
# In CI or scripts, pass -y to skip the prompt.
kamal remove -y
After it finishes, the proxy, app, and accessory containers are gone and the servers are logged out of the registry.
kamal remove accepts Kamal's standard global flags, so you can aim it at a specific environment instead of everything:
| Flag | Short | What it does |
|---|---|---|
--destination=DESTINATION | -d | Use a destination config (staging → config/deploy.staging.yml) |
--config-file=CONFIG_FILE | -c | Path to the config file (default config/deploy.yml) |
--hosts=HOSTS | -h | Run only on these hosts (comma-separated, supports * wildcards) |
--roles=ROLES | -r | Run only on these roles (comma-separated, supports * wildcards) |
# Tear down only the staging deployment
kamal remove -d staging
# Skip the prompt while removing staging
kamal remove -d staging -y
For the full list of global flags Kamal commands accept, see references/teardown-commands.md.
Sometimes you don't want a full teardown — you want to remove just one component, or remove more than the containers (an image, an accessory's data directory). Each component has its own remove subcommand, and each documents exactly what it deletes:
| Command | What it removes |
|---|---|
kamal app remove | App containers and images from servers |
kamal accessory remove [NAME] | The accessory container, image, and data directory from the host (use NAME=all for every accessory) |
kamal proxy remove | The proxy container and image from servers |
kamal registry logout | Logs out of the remote registry locally and remotely |
# Remove a single accessory (container, image, and its data directory)
kamal accessory remove mysql
# Remove every accessory
kamal accessory remove all
# Just the proxy container and image
kamal proxy remove
# Just log out of the registry on local and servers
kamal registry logout
kamal accessory remove deletes the accessory's data directory on the host along with the container and image. If that directory holds a database or other state you care about, back it up first — this is the most destructive of the remove subcommands. For how accessory data is mounted and persisted, see the accessories skill.
For the complete subcommand listings (including kamal registry remove) and every global flag, see references/teardown-commands.md.
| Goal | Command |
|---|---|
| Tear down the whole deployment | kamal remove |
| Tear down without the prompt | kamal remove -y |
| Tear down a specific environment | kamal remove -d staging |
| Remove app containers and images | kamal app remove |
| Remove one accessory (incl. its data) | kamal accessory remove NAME |
| Remove all accessories | kamal accessory remove all |
| Remove the proxy container and image | kamal proxy remove |
| Log out of the registry | kamal registry logout |
kamal deploy / kamal redeploy — the inverse of tearing one down.kamal app instead of removing them.kamal accessory remove deletes.kamal proxy reboot and kamal proxy remove.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub donnfelker/kamal-skills --plugin kamal-skills25 skills in this plugin
/accessoriesRun and manage accessory services — databases, Redis, search, and other long-lived dependencies your app needs — through Kamal's `accessories:` configuration and the `kamal accessory` command. Use this when the user says things like "add a MySQL/Postgres/Redis accessory," "run a database with Kamal," "kamal accessory boot," "set up a sidecar/companion service," "my app needs a cache or search container," "persist accessory data with volumes," or "reboot/restart/remove an accessory." Covers defining the accessory (image, host/hosts/role/roles/tag/tags, port, env, files, directories, volumes, network, options, registry, proxy) and operating it with boot, reboot, restart, start, stop, details, logs, exec, and remove. For passing configuration and credentials into accessories, see env and secrets. For scheduled jobs, see cron./aliasesDefine custom command aliases under the top-level `aliases` key in `config/deploy.yml` so a long, repeated `kamal` invocation becomes a single `kamal <name>`. Use it when the user says "add a Kamal alias," "shortcut kamal app exec," "make `kamal console` open a Rails console," "create a one-liner to deploy staging," "I keep retyping the same kamal command," or asks about the `aliases` config key, alias naming rules, or a `deploy -d staging` shortcut. Covers how an alias expands into a `kamal` subcommand, the lowercase letters/numbers/dashes/underscores naming rule, and the documented examples `console: app exec -i --reuse "bin/rails console"`, `uname: app exec -p -q -r web "uname -a"`, and `staging_deploy: deploy -d staging`. For the rest of `config/deploy.yml` and DRYing it up with YAML anchors, see config. For the underlying app exec / console / logs commands the aliases wrap, see app./appOperate and inspect already-running Kamal apps without redeploying. Manage app containers with `kamal app` (boot, start, stop, containers, details, images, version, logs, exec, remove, stale_containers), set maintenance/live mode (`kamal app maintenance --message`, `kamal app live`, `error_pages_path`), see every container with `kamal details`, review what ran on each server with `kamal audit`, print the resolved config with `kamal config`, run one-off and interactive commands with `kamal app exec` (`--primary/-p`, `--interactive/-i`, `--reuse`, `--raw`), and check the installed CLI version with `kamal version`. Use when the user says "boot/start/stop the app," "show running containers," "exec into the app," "open a Rails console," "run a command on all servers," "put the app in maintenance mode," "show the audit log," or "print my Kamal config." For shipping releases, see deploy. For reverting a release, see rollback. For log-driver and OTel/file config, see logging. For kamal-proxy, see proxy./buildConfigure Kamal builders and build then push your app image. Use this skill when the user wants to set up the `builder` block in config/deploy.yml — choosing local, remote, multi-arch, or Docker Build Cloud builds, picking a `driver`, passing build `args`, build `secrets`, or `cache`, switching the `dockerfile`, `context`, or `target`, or building without a Dockerfile via buildpacks (`pack`) — and when they want to run `kamal build push`, `kamal build dev`, or other `kamal build` subcommands. Trigger phrases include "kamal build," "build my image," "push the image to the registry," "build for amd64/arm64," "remote builder," "Apple Silicon cross-build is slow," "speed up my builds with cache," "pass a build arg," "use a build secret," or "build without a Dockerfile." For configuring the container registry, see registry. For the one-step flow that builds and ships in a single command, see deploy. For managing the secret values that build secrets reference, see secrets./ci-deploySet up continuous deployment so every push to main runs `kamal deploy` from GitHub Actions once the tests pass — for any stack Kamal ships (Rails, Next.js, Phoenix, Rust, static sites, and more). Use when the user says "auto-deploy on push," "deploy from GitHub Actions," "continuous deployment with Kamal," "deploy when CI passes," "set up CD," "stop deploying from my laptop," or "use 1Password in GitHub Actions." Covers the deploy ssh key, secrets in a GitHub environment or read from 1Password with a service account, the workflow, the GHA build cache, and verifying the first run. For running a deploy by hand, see deploy. For the secrets file itself, see secrets. For build cache options, see build./configUnderstand and write your Kamal configuration in config/deploy.yml. Use when the user says "set up config/deploy.yml," "what goes in my deploy.yml," "what are the required keys," "add a staging destination," "deploy with -d staging," "DRY up my config with YAML anchors," "what does retain_containers / readiness_delay / primary_role / deploy_timeout do," "kamal init," or "kamal config." Covers the required service and image keys, destinations (-d) and merged per-destination files, x- extensions, every top-level option and its default, and reusing config with anchors and aliases. For configuring servers and roles, see servers. For env and secrets, see env. For command shortcuts, see aliases. For a first deployment, see setup.Other plugins' skills for the same job