docker buildx rm

Estimated reading time: 2 minutes


Remove a builder instance

Usage

$ docker buildx rm [NAME]

Refer to the options section for an overview of available OPTIONS for this command.

Description

Removes the specified or current builder. It is a no-op attempting to remove the default builder.

For example uses of this command, refer to the examples section below.

Options

Name, shorthand Default Description
--all-inactive Remove all inactive builders
--force , -f Do not prompt for confirmation
--keep-daemon Keep the buildkitd daemon running
--keep-state Keep BuildKit state
--builder Override the configured builder instance

Examples

Remove all inactive builders (--all-inactive)

Remove builders that are not in running state.

$ docker buildx rm --all-inactive
WARNING! This will remove all builders that are not in running state. Are you sure you want to continue? [y/N] y

Override the configured builder instance (--builder)

Same as buildx --builder.

Do not prompt for confirmation (--force)

Do not prompt for confirmation before removing inactive builders.

$ docker buildx rm --all-inactive --force

Keep the buildkitd daemon running (--keep-daemon)

Keep the buildkitd daemon running after the buildx context is removed. This is useful when you manage buildkitd daemons and buildx contexts independently. Currently, only supported by the docker-container and kubernetes drivers.

Keep BuildKit state (--keep-state)

Keep BuildKit state, so it can be reused by a new builder with the same name. Currently, only supported by the docker-container driver.

Parent command

Command Description
docker buildx Docker Buildx
Command Description
docker buildx bake Build from a file
docker buildx build Start a build
docker buildx create Create a new builder instance
docker buildx du Disk usage
docker buildx imagetools Commands to work on images in registry
docker buildx inspect Inspect current builder instance
docker buildx ls List builder instances
docker buildx prune Remove build cache
docker buildx rm Remove a builder instance
docker buildx stop Stop builder instance
docker buildx use Set the current builder instance
docker buildx version Show buildx version information