Skip to content

deckctl cache

Handles cache lifecycle. Only GitLab-backed templates are cached; local sources are read directly from disk.

deckctl cache [command] [flags]
SubcommandPurpose
listList cache entries
clearRemove cache entries

All subcommands also accept the global flags, notably --cache-dir.


deckctl cache list [flags]

No command-specific flags.

Table columns:

ColumnMeaning
SourceSource name from config.yaml
TemplateTemplate name (the GitLab project slug)
SHAThe cached ref — a tag or branch name. Not necessarily a commit SHA.
SizeTotal bytes on disk, human-readable
AgeTime since the entry was last verified against the server
Terminal window
deckctl cache list
deckctl cache list -o json
deckctl cache list --cache-dir /tmp/deckctl-cache

-o json includes the full metadata: source, template, sha, fetched_at, last_checked, etag, source_url, plus the entry’s size and path.


deckctl cache clear [flags]
FlagDefaultDescription
--source <name>Only entries from this source
--template <name>Only entries for this template name
--older-than <dur>Only entries whose last check is older than this
--auto-approvefalseSkip the confirmation prompt

Filters compose with AND — an entry must match every active filter to be removed. With no filters, everything is removed.

--older-than takes a number plus a single unit: s, m, h, d, w. Decimals are accepted (0.5h). It is compared against last_checked, not fetched_at.

Terminal window
# Everything, with a confirmation prompt
deckctl cache clear
# One source
deckctl cache clear --source work
# One template across all sources
deckctl cache clear --template go-service
# Anything not verified in the last week
deckctl cache clear --older-than 1w
# Combined, non-interactive
deckctl cache clear --source work --older-than 30d --auto-approve

Deleting the cache directory manually with rm -rf is equally safe — deckctl rebuilds what it needs on the next apply.