remove

suspend fun remove(name: String, force: Boolean = false, noPrune: Boolean = false): Result<List<ImageDeleteResponseItem>, ErrorResponse>

Remove an image

Remove an image, along with any untagged parent images that were referenced by that image.

Images can't be removed if they have descendant images, are being used by a container, or are being pushed or pulled.

Return

Operation response on success, or the Docker error response. Transport failures and cancellation can throw.

Parameters

name

Image reference or ID accepted by Docker.

force

Request forced removal; Docker still enforces its resource constraints.

noPrune

Retain untagged parent images.