diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-12-09 08:46:44 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-09 08:46:44 -0500 |
commit | b875c5c27c503108f1984256833a9a2da4d0c5d1 (patch) | |
tree | 9c663f0c33849394373810b12f3db2974c3efaae /cmd/podman/system/prune.go | |
parent | ae7f601649fd9d5e57ee0f6b0d35283bc4485259 (diff) | |
parent | a59e2a1a114c039e1780aa2b08b9452dc569cdf4 (diff) | |
download | podman-b875c5c27c503108f1984256833a9a2da4d0c5d1.tar.gz podman-b875c5c27c503108f1984256833a9a2da4d0c5d1.tar.bz2 podman-b875c5c27c503108f1984256833a9a2da4d0c5d1.zip |
Merge pull request #8599 from rhatdan/prune
Repeat system pruning until there is nothing removed
Diffstat (limited to 'cmd/podman/system/prune.go')
-rw-r--r-- | cmd/podman/system/prune.go | 19 |
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 } |