LinuxCommandLibrary

distrobox-rm

Remove a distrobox container

TLDR

Remove a Distrobox container (Tip: Stop the container before removing it)

$ distrobox-rm [container_name]
copy

Remove a Distrobox container forcefully
$ distrobox-rm [container_name] [[-f|--force]]
copy

SYNOPSIS

distrobox-rm [OPTIONS] CONTAINER_NAME [...]

PARAMETERS

-h, --help
    Display a help message and exit.

-f, --force
    Do not ask for confirmation before removing the container(s).

-a, --all
    Remove all existing distrobox containers.

-D, --delete-home
    Delete the symlink to the host's home directory inside the container (if it exists).

-v, --verbose
    Enable verbose output, showing more details about the removal process.

-q, --quiet
    Enable quiet output, suppressing informational messages.

--dry-run
    Perform a dry run; do not actually remove anything, just show what would be done.

CONTAINER_NAME
    The name(s) of the distrobox container(s) to remove. Multiple names can be specified as arguments.

DESCRIPTION

distrobox-rm is used to remove one or more existing Distrobox containers. It cleans up the container and any associated files that were created specifically for that distrobox. This command is essential for managing your distrobox environments, allowing you to free up disk space and remove environments you no longer need.

When a distrobox is removed, its entire root filesystem, configuration, and any data stored inside that specific container are permanently deleted. It's crucial to back up any important data before removing a distrobox. The command ensures a clean removal, leaving no lingering container remnants on the host system.

CAVEATS

Using distrobox-rm will permanently delete the specified container(s) and all data stored within them. Ensure you have backed up any critical data before proceeding, especially if using the -a or --all option, which removes all distrobox environments. By default, the command asks for confirmation before deletion unless -f or --force is used.

CONFIRMATION PROMPT

By default, distrobox-rm will ask for confirmation before removing a container to prevent accidental data loss. This prompt can be bypassed using the --force (-f) option.

IMPACT OF --DELETE-HOME

When the --delete-home (-D) option is used, it specifically targets and removes the symbolic link created for the user's home directory inside the container. This action does not affect or delete the actual home directory on the host system.

HISTORY

The distrobox project was initiated by Luca Di Maio (Castedo) to simplify the use of containerized environments, making them feel more integrated with the host system. distrobox-rm has been a fundamental utility since the early stages of the project's development, providing the essential capability to cleanly dispose of created environments. Its design ensures that containers are removed thoroughly, preventing orphaned resources and maintaining system hygiene, reflecting the project's goal of seamless integration and easy management.

SEE ALSO

Copied to clipboard