atmos vendor clean
Remove every vendored file recorded in vendor.lock.yaml. Only deletes files the lock actually
owns. It never deletes files another still-selected artifact owns, and never deletes files outside
the lock entirely.
Usage
atmos vendor clean [--component <name>] [--tags <a,b>] [--force] [--dry-run]
atmos vendor clean [--stack <stack>] [--labels <k>=<v>] [--tags <a,b>] [--force] [--dry-run]
By default, vendor clean preserves any lock-owned file whose content doesn't match its recorded
checksum. It refuses to run and names every such file. Pass --force to delete them anyway. After
a successful clean, vendor clean drops the removed artifacts from vendor.lock.yaml.
At most one base selector may be given: --component or --stack/--labels (a stack-resolved
component set, composable with each other, like
atmos vendor pull's own --stack/--labels). --tags
(vendor.yaml's own declared source tags) is a separate, independent filter that composes with
either base selector, or stands on its own — narrowing the cleaned set to only components whose
declared tags also match; a component with no vendor.yaml entry has no tags to match and is
excluded by a non-empty --tags filter. Omit every selector to clean everything. A selector that
matches nothing is an error, not a silent "clean everything" fallback.
Examples
# Preview what would be removed, without deleting anything.
atmos vendor clean --dry-run
# Remove every vendored artifact recorded in the lock.
atmos vendor clean
# Remove only one component's vendored files.
atmos vendor clean --component vpc
# Remove every component whose vendor.yaml source declares a given tag.
atmos vendor clean --tags networking
# Remove every component in a stack, or matching stack metadata.labels.
atmos vendor clean --stack dev-us-west-2
atmos vendor clean --labels tier=1
# Remove a stack's components, narrowed further by declared vendor.yaml tags.
atmos vendor clean --stack dev-us-west-2 --tags networking
# Delete lock-owned files even if they were modified since vendoring.
atmos vendor clean --force
Flags
--component/-c(string)- Clean only this component. Mutually exclusive with
--stack/--labels. Composes with--tags(narrows to this component only if its declaredvendor.yamltags also match). --tags(string)- Clean only components whose
vendor.yamlsource declares any of these comma-separated tags (matches any). An independent filter: composes with--componentor--stack/--labelsto narrow further, or stands on its own. --stack/-s(string)- Clean only components belonging to the specified stack. Composes with
--labelsto narrow further, and with--tagsto filter by declared source tags. Mutually exclusive with--component. --labels(string)- Clean only components whose stack
metadata.labelsmatch ALL of these comma-separatedkey=valueorkey:valuepairs. Composes with--stackand--tags. Mutually exclusive with--component. --type/-t(string, defaultterraform)- Component type (
terraform,helmfile, orpacker). Pass this flag explicitly to scope a--stack/--labelsselection to one component type. When you omit it, every component type is considered. --file(string, default./vendor.yaml)- The vendor manifest to read declared source tags from when resolving
--tags. --force(boolean)- Delete modified lock-owned files instead of refusing to run.
--dry-run(boolean)- Show which files would be removed without deleting anything.
A single modified file blocks the entire run unless you pass --force. Atmos deletes no files for
that invocation, even unmodified ones, until you resolve the conflict or pass --force. Scope with
--component to clean only the artifacts you're sure about.