diff --git a/cmd/analyze.go b/cmd/analyze.go index 89c6cf85..f72c3a76 100644 --- a/cmd/analyze.go +++ b/cmd/analyze.go @@ -1378,6 +1378,8 @@ func (a *analyzeCommand) RmVolumes(ctx context.Context) error { func (a *analyzeCommand) RmProviderContainers(ctx context.Context) error { for i := range a.providerContainerNames { con := a.providerContainerNames[i] + // because we are using the --rm option when we start the provider container, + // it will immediately be removed after it stops cmd := exec.CommandContext( ctx, Settings.PodmanBinary, @@ -1389,13 +1391,6 @@ func (a *analyzeCommand) RmProviderContainers(ctx context.Context) error { "container", con) continue } - a.log.V(1).Info("removing container", "container", con) - err = exec.CommandContext(ctx, Settings.PodmanBinary, "rm", con).Run() - if err != nil { - a.log.V(1).Error(err, "failed to remove container", - "container", con) - continue - } } return nil }