Why is "podman container cleanup" used ?
Environment
- RHEL
- Podman
Resolution
- podman container cleanup cleans up exited containers by removing all mount points and network configuration from the host.
- The container name or ID can be used. The cleanup command
does not
remove the containers. Running containers will not be cleaned up. - Sometimes container mount points and network stacks can remain if the
podman
command was killed or the container ran in daemon mode. - This command is automatically executed when containers are run in daemon mode by the
conmon process
when the container exits.
SYNTAX
podman container cleanup [options] container [container …]
EXAMPLES
Clean up the container “mywebserver”.
$ podman container cleanup mywebserver
Clean up the containers with the names “mywebserver”, “myflaskserver”, “860a4b23”.
$ podman container cleanup mywebserver myflaskserver 860a4b23
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments