Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Purge behavior differs from documentation #64

Open
pikausp opened this issue Mar 2, 2020 · 7 comments
Open

Purge behavior differs from documentation #64

pikausp opened this issue Mar 2, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@pikausp
Copy link

pikausp commented Mar 2, 2020

Describe the bug
When I attempted to purge untagged images using the

acr purge
    --registry <Registry Name>
    --filter <Repository Name>:<Regex filter>
    --untagged

I received the following error Error: required flag(s) "ago" not set. So I added --ago 0d and the command went through, but it also deleted tagged images. My filter was set to repname:.* as I assumed the tag filter was irrelevant when you specify the --untagged switch. Setting the filter to repname:^$ fixed the problem, but the --untagged is still required. Omitting this switch results in no images being deleted. Is this behaviour expected?

So the working command was

acr purge
    --registry <Registry Name>
    --filter <Repository Name>:^$
    --ago 0d
    --untagged
@pikausp pikausp added the bug Something isn't working label Mar 2, 2020
@SailingYYC
Copy link

In our process we rely heavily on "floating tags". The simplest of docker examples is the latest tag, this means we have a significant number of untagged manifests that it would be highly beneficial to be able to purge.

@pitawatn
Copy link

pitawatn commented Jul 6, 2021

I came here with the same problem but after carefully reading the documentation twice, I realized that the --untagged parameter does not mean that it would delete only untagged images. It is meant to delete untagged images if they are available.

--untagged - Specifies that manifests that don't have associated tags (untagged manifests) are deleted.

Still, I believe many of us read that documentation to find a way to purge only untagged images, not deleting all images. I would suggest that Microsoft update that doc to show how to purge only untagged images.

@itpropro
Copy link

itpropro commented Sep 9, 2021

Exactly this. This needs to be clarified in the documentation and we need some information on how to only delete untagged manifests, but leave the tags in place.

@tsaeki-7bk
Copy link

I have the same problem.

I believe many of us read that documentation to find a way to purge only untagged images, not deleting all images.

I believe so too.

@itpropro
Copy link

itpropro commented Jan 9, 2022

@timja or @Wwwsylvia, can anyone take a look at this? The issue is nearly 2 years old.

@timja
Copy link
Contributor

timja commented Jan 9, 2022

I’m pretty sure we do this via configuration in the registry, you can tell it do delete unstaffed manifests after x days

@johnlinvc
Copy link

My workaround on this is to set --ago=99999d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants