Skip to content

docker rmi --unused #9054

@SamSaffron

Description

@SamSaffron

I raised this discussion here

https://forums.docker.com/t/command-to-remove-all-unused-images/20

To recap we often find ourselves with systems saturated with unused images, it would be super awesome if we had a simple way of cleaning up.

Eg:

docker rmi --unused
# remove all images that are not referenced by active containers

This is tricky to script as you need to walk through dependencies, the workaround is just to ignore the errors from rmi, but it feels unclean.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/runtimeRuntimekind/featureFunctionality or other elements that the project doesn't currently have. Features are new and shiny

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions