LinuxCommandLibrary

toolbox-rm

Remove toolbox containers

TLDR

Remove a toolbox container

$ toolbox rm [container_name]
copy

Remove all toolbox containers
$ toolbox rm [[-a|--all]]
copy

Force the removal of a currently active toolbox container
$ toolbox rm [[-f|--force]] [container_name]
copy

SYNOPSIS

toolbox rm [-f] [-i] CONTAINER

PARAMETERS

-f, --force
    Force removal of the container without prompting for confirmation.

-i, --image
    Also remove the backing image of the toolbox after removing the container. This will remove the base operating system image from your system if no other toolboxes are using it.

CONTAINER
    The name or ID of the toolbox container to remove. If omitted, the default toolbox container is removed. If a container is specified and no other matching toolboxes exist, it will be removed.

DESCRIPTION

The toolbox-rm command is used to remove existing toolbox containers. It stops the container if it's running and then deletes it. It can also remove the toolbox image that backs the container. This is a destructive operation; all data within the container will be permanently lost. The toolbox command is designed to run on Fedora and similar distributions to allow users to create and work in a containerized environment for development or other tasks while keeping the host system clean. This isolates the project requirements and dependencies from the host system, thus preventing conflicts.

CAVEATS

Using the -i flag will remove the base image if no other toolboxes rely on it. Ensure no other toolboxes will be impacted before using the -i flag. Data within the container is permanently lost upon removal.

CONFIRMATION

Without the -f flag, toolbox-rm will prompt for confirmation before removing the container. This provides a safeguard against accidental data loss.

IMAGE REMOVAL IMPACT

Removing the image used by the toolbox (using -i) can save disk space. However, recreating a toolbox after image removal might take longer, as the image must be downloaded again.

HISTORY

Toolbox was developed to provide a container-based development environment on systems like Fedora CoreOS, where traditional package management is discouraged on the host system. It leverages podman or docker to create and manage containers, enabling a clean separation between the host environment and development dependencies.

SEE ALSO

Copied to clipboard