Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
version: "2"
run:
concurrency: 2
deadline: 15m
linters-settings:
golint:
min-confidence: 0
linters:
default: none
enable:
Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,25 @@ acr purge \
--untagged
```

#### Untagged-only flag

To delete ONLY untagged manifests without deleting any tags, the `--untagged-only` flag should be set. This flag makes the `--ago` and `--keep` flags not applicable, and `--filter` becomes optional.

```sh
# Delete untagged manifests in all repositories
acr purge \
--registry <Registry Name> \
--untagged-only

# Delete untagged manifests in specific repositories matching a filter
acr purge \
--registry <Registry Name> \
--filter <Repository Filter/Name>:<Regex Filter> \
--untagged-only
```

Note: The `--untagged` and `--untagged-only` flags are mutually exclusive.

#### Keep flag

To keep the latest x number of to-be-deleted tags, the `--keep` flag should be set.
Expand Down
211 changes: 173 additions & 38 deletions cmd/acr/purge.go

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions cmd/acr/purge_test.go

Large diffs are not rendered by default.

Loading