Skip to main content
Removes stopped containers to reclaim disk space. The command outputs the amount of space freed after deletion.

Usage

container prune [--debug]

Options

--debug
boolean
Enable debug output

Examples

# Remove all stopped containers
container prune

Behavior

This command will:
  • Remove all containers that are not currently running
  • Display the amount of disk space reclaimed
  • Preserve all running containers
This operation cannot be undone. Make sure you don’t need any stopped containers before running this command.
Regularly running container prune helps keep your system clean and frees up disk space.

Build docs developers (and LLMs) love