remove
Recipe card from the charly-core plugin (Commands — runtime CLI verbs).
charly remove – Remove Service Container
Section titled “charly remove – Remove Service Container”Overview
Section titled “Overview”Removes a service container along with its quadlet file and charly.yml entry. --purge additionally purges the deploy’s named volumes, its encrypted (gocryptfs) volumes, AND the synthesized <name>-overlay images an add_candy: overlay build produced (charly/commands.go purgeDeployArtifacts). Runs lifecycle hooks before removal.
Quick Reference
Section titled “Quick Reference”| Action | Command | Description |
|---|---|---|
| Remove container | charly remove <image> |
Remove container, quadlet, and deploy entry |
| Purge volumes | charly remove <image> --purge |
Also remove named + encrypted volumes AND the <name>-overlay images |
| Keep deploy entry | charly remove <image> --keep-deploy |
Keep charly.yml entry for re-configuration |
| With env vars | charly remove <image> -e KEY=VALUE |
Pass env vars to pre_remove hooks |
# Remove a service (container + quadlet + charly.yml entry)charly remove jupyter
# Remove and purge all named volumescharly remove ollama --purge
# Remove but keep charly.yml entry for later re-configurationcharly remove immich --keep-deploy
# Pass environment variables to pre_remove hookscharly remove openclaw -e CLEANUP_MODE=full| Flag | Description |
|---|---|
--purge |
Also remove the deploy’s named + encrypted volumes AND the synthesized <name>-overlay images (an add_candy: overlay build’s artifacts) — so a pod check bed’s charly remove --purge teardown no longer leaks its overlay image |
--keep-deploy |
Preserve the charly.yml entry (useful for re-running charly config) |
-e, --env KEY=VALUE |
Pass environment variables to pre_remove lifecycle hooks |
Behavior
Section titled “Behavior”- Runs
pre_removelifecycle hooks (if defined in image labels) - Stops the container if still running
- Removes the quadlet file (quadlet mode) or container (direct mode)
- Removes the charly.yml entry (unless
--keep-deploy) - With
--purge: removes named volumes (charly-<image>-<name>)
Lifecycle Hooks
Section titled “Lifecycle Hooks”Images can define pre_remove hooks that run before the container is removed. These are useful for graceful shutdown, data export, or cleanup tasks. Use -e to pass context to hooks.
Instance Removal
Section titled “Instance Removal”Remove specific instances with -i:
charly remove selkies-desktop -i 192.241.92.221 # Remove instancecharly remove selkies-desktop -i 192.241.92.221 --purge # Also purge volumesInstance removal automatically cleans the instance’s env_provide and mcp_provide from charly.yml provides section. Other instances of the same base image are unaffected.
Cross-References
Section titled “Cross-References”-
/charly-build:pull– Prerequisite: fetch the image into local storage; handles remote refs (@github.com/...) and theErrImageNotLocalrecovery path -
/charly-core:stop– Stop without removing -
/charly-core:charly-config– Configure/reconfigure services (see “Full instance removal” for 3-step cleanup) -
/charly-core:deploy– Deploy.yml management, tunnel configuration -
/charly-core:service– Full service lifecycle -
/charly-build:charly-mcp-cmd– aftercharly config removecleans this instance’smcp_providefrom the globalprovides.mcp:list, consumers’CHARLY_MCP_SERVERSno longer lists it; usecharly check live <consumer> --filter mcpto confirm the cleanup propagated