Why is "podman container cleanup" used ?
- 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 notremove the containers. Running containers will not be cleaned up.
- Sometimes container mount points and network stacks can remain if the
podmancommand was killed or the container ran in daemon mode.
- This command is automatically executed when containers are run in daemon mode by the
conmon processwhen the container exits.
podman container cleanup [options] container [container …]
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
- Red Hat OpenShift Container Platform
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.