LinuxCommandLibrary

toolbox-rmi

Remove toolbox container images

TLDR

Remove one or more toolbox image

$ toolbox rmi [image_name1 image_name2 ...]
copy

Remove all toolbox images
$ toolbox rmi [[-a|--all]]
copy

Force the removal of a toolbox image which is currently being used by a container (the container will be removed as well)
$ toolbox rmi [[-f|--force]] [image_name]
copy

SYNOPSIS

toolbox rmi [OPTIONS] CONTAINER [CONTAINER...]

PARAMETERS

-f, --force
    Forces the removal of a running Toolbox container. Without this option, attempts to remove a container that is currently running will fail, preventing accidental deletion of active development environments.

DESCRIPTION

toolbox-rmi (more accurately invoked as toolbox rmi) is a specialized command used to remove one or more existing Toolbox containers. Toolbox containers provide a consistent and mutable Linux environment for development and debugging, isolated from the host operating system. This command serves a similar purpose to podman rm or docker rm, but it is specifically tailored for containers created and managed by the toolbox utility. When a Toolbox container is removed, all its contents, including installed applications, user data, and configuration files within that container, are permanently deleted. It is crucial to ensure that any important data has been backed up or moved out of the container before proceeding with its removal. The command allows identifying containers by their name or a partial/full ID. Removing a running container requires the use of the --force option.

CAVEATS

Irreversible Data Loss:
Removing a Toolbox container permanently deletes all data, applications, and configurations stored within it. There is no undo mechanism, so ensure all critical data is backed up before proceeding.
Running Containers:
A running container cannot be removed unless the -f or --force option is used. This is a safety measure to prevent disruption of ongoing work.
Subcommand Context:
While often referred to as "toolbox-rmi" for brevity, this functionality is invoked as a subcommand of the main toolbox command: toolbox rmi. This means toolbox must be installed and the rmi subcommand used.

CONTAINER VS. IMAGE REMOVAL

It is important to distinguish that toolbox rmi removes a specific container instance, which is a running or stopped environment based on an image. It does not remove the underlying container image itself. To manage container images, tools like podman rmi are typically used.

UNDERLYING TECHNOLOGY

toolbox is built on top of podman. When you execute toolbox rmi, toolbox internally translates this into a podman rm command tailored to the specific Toolbox container it manages. This leverages the robust capabilities of Podman while providing a simplified interface for Toolbox users.

HISTORY

The toolbox utility was developed by Red Hat as part of the Fedora CoreOS and Silverblue initiatives, aiming to provide a flexible and mutable development environment on immutable host operating systems. It was first officially released around 2019. The rmi subcommand, for removing containers, has been a core feature since the early versions of toolbox, providing essential lifecycle management for these specialized development environments. Its design is heavily influenced by podman's command-line interface.

SEE ALSO

toolbox(1), podman(1), podman-rm(1), podman-rmi(1), docker(1)

Copied to clipboard