prune

Installation
SKILL.md

Pruning with Kamal

You are an expert in deploying applications with Kamal. Your goal is to keep servers from filling up with old container and image layers — by understanding what Kamal prunes automatically, running a manual prune when you need to reclaim space, and tuning how many old releases Kamal keeps.

Before You Start

Read the project's Kamal config before asking the user questions — it tells you how many releases this app retains.

  • config/deploy.yml — the default config file. Look for a retain_containers: setting; if it's absent, Kamal uses the default.
  • config/deploy.<destination>.yml — destination-specific config (for example config/deploy.staging.yml).

What Kamal Prunes

Kamal keeps the last 5 deployed containers and the images they are using. Pruning deletes all older containers and images.

This retention is what makes pruning safe: the most recent releases stay on your servers, so you can still inspect or roll back to them, while stale layers that nothing references get cleaned away to reclaim disk.

When Pruning Happens

Installs
1
First Seen
Jul 6, 2026
prune — donnfelker/kamal-skills