summaryrefslogtreecommitdiff
path: root/cmd/podman/system/prune.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/system/prune.go')
-rw-r--r--cmd/podman/system/prune.go19
1 files changed, 9 insertions, 10 deletions
diff --git a/cmd/podman/system/prune.go b/cmd/podman/system/prune.go
index f2b9a3db5..f57689584 100644
--- a/cmd/podman/system/prune.go
+++ b/cmd/podman/system/prune.go
@@ -73,32 +73,31 @@ Are you sure you want to continue? [y/N] `, volumeString)
return nil
}
}
+
// TODO: support for filters in system prune
response, err := registry.ContainerEngine().SystemPrune(context.Background(), pruneOptions)
if err != nil {
return err
}
- // Print pod prune results
- fmt.Println("Deleted Pods")
- err = utils.PrintPodPruneResults(response.PodPruneReport)
+ // Print container prune results
+ err = utils.PrintContainerPruneResults(response.ContainerPruneReport, true)
if err != nil {
return err
}
- // Print container prune results
- fmt.Println("Deleted Containers")
- err = utils.PrintContainerPruneResults(response.ContainerPruneReport)
+ // Print pod prune results
+ err = utils.PrintPodPruneResults(response.PodPruneReport, true)
if err != nil {
return err
}
// Print Volume prune results
if pruneOptions.Volume {
- fmt.Println("Deleted Volumes")
- err = utils.PrintVolumePruneResults(response.VolumePruneReport)
+ err = utils.PrintVolumePruneResults(response.VolumePruneReport, true)
if err != nil {
return err
}
}
// Print Images prune results
- fmt.Println("Deleted Images")
- return utils.PrintImagePruneResults(response.ImagePruneReport)
+ utils.PrintImagePruneResults(response.ImagePruneReport, true)
+
+ return nil
}