summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libpod/runtime_ctr.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index 0fe896e5f..4256a84a0 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -262,7 +262,8 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force bool)
}
} else if !(c.state.State == ContainerStateConfigured ||
c.state.State == ContainerStateCreated ||
- c.state.State == ContainerStateStopped) {
+ c.state.State == ContainerStateStopped ||
+ c.state.State == ContainerStateExited) {
return errors.Wrapf(ErrCtrStateInvalid, "cannot remove container %s as it is %s - running or paused containers cannot be removed", c.ID(), c.state.State.String())
}