Skip to content
↗ Astrona.io Cloud Native learning, open to everyone.

Astrona data clean

astrona data clean

Preview deletion of unused download and repository caches

Synopsis

Preview removal of image, addon and Git caches, plus catalog and update-check metadata. With --policy, select only entries exceeding cache-retention-days or cache-max-size-gb. Use --yes to delete; --dry-run always previews, even with --yes. Saved lab state blocks cleanup, including stopped VMs. Destroy unwanted labs through astrona destroy first. Credentials, results, resources, bundles, logs and installed tools are kept. Downloads will be needed again, so offline use may be affected. Finish commands running in older CLI versions before cleanup.

astrona data clean [flags]

Options

      --dry-run         Preview without changing files, even with --yes
  -h, --help            help for clean
  -o, --output string   Output format: json
      --policy          Only remove entries that exceed saved cache age or combined size limits
      --temp-only       Only remove partial image/addon downloads older than 24h; never scan the system temp directory
  -y, --yes             Apply deletions; without this flag only show a preview

Options inherited from parent commands

      --accept-terms      Accept this CLI's usage terms and data-loss risk notice; required on each operational CI command (read: astrona terms)
  -c, --config string     Path or URL to the lab config directory (with --git: a subdirectory within the cloned repo) (default ".")
  -f, --file string       Configuration file name override (default "config.yaml")
      --git string        Git repository URL to clone/pull (https://, git@host:, or ssh://) — --config then selects a subdirectory within it
      --git-ref string    Git branch, tag, or commit to check out (used with --git; default: the repo's default branch)
      --headless          Disable the terminal UI and CLI prompts; run/reset skip login reminders and new account sessions
      --install-version   If the lab needs another astrona release (astronaVersion) that isn't installed, install it without asking — for CI
      --trust             Approve running a remote (--git / URL) lab without asking — for CI; review the lab first
      --update-check      Check for new CLI releases (disabled in CI, without a terminal, or by ASTRONA_NO_UPDATE_CHECK) (default true)
      --verbose           Stream the full output of every underlying command instead of the compact step view

SEE ALSO

  • astrona data - Show local file usage, clean caches, or reset CLI preferences
Auto generated by spf13/cobra on 20-Oct-2026