Options
Options
Customize how Backup Cleanup removes obsolete backup files.
custy cleanup backupsCategory
Quick Command
custy cleanup backupsOverview
Backup Cleanup supports a small number of command-specific options.
Most projects rely on the values configured in
config.toml, while command-line options can temporarily override those
settings for a single execution.
Available Options
Cleanup Types
The cleanup target determines which backup files are considered during the operation.
Available values are:
| Value | Description |
|---|---|
commit | Clean commit message backups only. |
tag | Clean tag message backups only. |
all | Clean both commit and tag backups. |
When no cleanup type is specified, Custy resolves the value from your project configuration.
Retention Count
The --keep option specifies the number of newest backup files that should be
preserved.
For example:
--keep 5--keep 10--keep 20
Custy sorts backup files by age and removes only those exceeding the configured retention count.
Global Options
Backup Cleanup also supports Custy's global CLI options.
Examples include:
--dry-run--debug--log-level
Global options always appear before the command.
Example:
custy --dry-run cleanup backups
Configuration Resolution
When an option is omitted, Custy resolves its value using the following priority:
- Command-line option.
- Project configuration (
config.toml). - Built-in default value.
This resolution strategy provides predictable behavior while allowing temporary overrides when needed.
What's Next?
Continue to the Workflow page to understand how Backup Cleanup selects, retains, and removes obsolete backup files during execution.