You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Untag all tags that begin with hello in app repository | --filter `"app:^hello.*"`|
127
+
| Untag tags that end with world in app repository | --filter `"app:\w*world\b"`|
128
+
| Untag tags that include hello-world in their name in app repository | --filter `"app:hello-world"`|
129
+
| Untag all tags in repositories ending in /cache | --filter `".*/cache:.*"`|
130
+
| Untag all tags in app repository | --filter `"app:.*"`|
131
+
| Untag all tags in all repositories | --filter `".*:.*"`|
132
+
| Clean only untagged manifests in all repos (with --untagged) | --filter `".*:^$"`|
133
+
| Clean only untagged manifests in app repo (with --untagged) | --filter `"app:^$"`|
134
+
132
135
133
136
#### Ago flag
134
137
@@ -160,7 +163,7 @@ The following table further explains the functionality of this flag.
160
163
| To delete all images that were last modified before 10 minutes ago | --ago 10m |
161
164
| To delete all images that were last modified before 1 hour and 15 minutes ago | --ago 1h15m |
162
165
163
-
The duration should be of the form \[integer\]d\[string\] where the first integer specifies the number of days and the string is in a go style duration (can be omitted)
166
+
The duration should be of the form \[integer\]d\[string\] where the first integer specifies the number of days and the string is in a go style duration (can be omitted). The maximimum ago duration is set to 150 years but that will effectively clean nothing up as no images should be that old.
cmd.Flags().BoolVar(&purgeParams.untagged, "untagged", false, "If the untagged flag is set all the manifests that do not have any tags associated to them will be also purged, except if they belong to a manifest list that contains at least one tag")
146
147
cmd.Flags().BoolVar(&purgeParams.dryRun, "dry-run", false, "If the dry-run flag is set no manifest or tag will be deleted, the output would be the same as if they were deleted")
147
148
cmd.Flags().BoolVar(&purgeParams.includeLocked, "include-locked", false, "If the include-locked flag is set, locked manifests and tags (where deleteEnabled or writeEnabled is false) will be unlocked before deletion")
148
-
cmd.Flags().StringVar(&purgeParams.ago, "ago", "", "The tags and untagged manifests that were last updated before this duration will be deleted, the format is [number]d[string] where the first number represents an amount of days and the string is in a Go duration format (e.g. 2d3h6m selects images older than 2 days, 3 hours and 6 minutes)")
149
+
cmd.Flags().StringVar(&purgeParams.ago, "ago", "", "The tags and untagged manifests that were last updated before this duration will be deleted, the format is [number]d[string] where the first number represents an amount of days and the string is in a Go duration format (e.g. 2d3h6m selects images older than 2 days, 3 hours and 6 minutes). Maximum duration is capped at 150 years to prevent overflow")
149
150
cmd.Flags().IntVar(&purgeParams.keep, "keep", 0, "Number of latest to-be-deleted tags to keep, use this when you want to keep at least x number of latest tags that could be deleted meeting all other filter criteria")
150
151
cmd.Flags().StringArrayVarP(&purgeParams.filters, "filter", "f", nil, "Specify the repository and a regular expression filter for the tag name, if a tag matches the filter and is older than the duration specified in ago it will be deleted. Note: If backtracking is used in the regexp it's possible for the expression to run into an infinite loop. The default timeout is set to 1 minute for evaluation of any filter expression. Use the '--filter-timeout-seconds' option to set a different value.")
0 commit comments