Skip to content

Removing multiple running images is broken #4109

Closed

Description

@apostasie

Description

When someimage is currently in use by a container, nerdctl rmi -f someimage will create a new unnamed image (name: :) so that we keep a ref on the layers (though this is currently buggy, see #4107).

But then, trying to remove multiple such images will fail, as image creation will bail out (image ":": already exists).

Does anyone have a suggestion on how to address this?
Is there a way to instruct containerd to create an image without a name? (eg: currently, passing en empty name will fail on creation)

Steps to reproduce the issue

nerdctl run -d debian sleep inf
nerdctl run -d alpine sleep inf
nerdctl rmi -f alpine
nerdctl rmi -f debian

Describe the results you received and expected

FATA[0000] 1 errors:
image ":": already exists

What version of nerdctl are you using?

main

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

No response

Activity

  1. added
    bug
    and removed
    kind/unconfirmed-bug-claim
    on Apr 16, 2025
  2. ogulcanaydogan commented on Sep 8, 2026

    @ogulcanaydogan
    Contributor

    Opened #5191. Same core idea as the earlier #5127 (name the dangling ref after its digest instead of the fixed ":" literal), verified end-to-end against a real containerd daemon: reproduced the original failure on unpatched main, then confirmed the fix on the branch.

  3. added a commit that references this issue on Sep 17, 2026
    597602a
  4. added a commit that references this issue on Oct 3, 2026
    fa18f83
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions