Skip to content

Commit a4e37ad

Browse files
Merge pull request #18354 from Luap99/reset
system reset: show graphRoot/runRoot before removal
2 parents 0d9b5f6 + 6aaf6a2 commit a4e37ad

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

cmd/podman/system/reset.go

+7
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ func reset(cmd *cobra.Command, args []string) {
6666
- all machines
6767
- all volumes`)
6868

69+
info, _ := registry.ContainerEngine().Info(registry.Context())
70+
// lets not hard fail in case of an error
71+
if info != nil {
72+
fmt.Printf(" - the graphRoot directory: %q\n", info.Store.GraphRoot)
73+
fmt.Printf(" - the runRoot directory: %q\n", info.Store.RunRoot)
74+
}
75+
6976
if len(listCtn) > 0 {
7077
fmt.Println(`WARNING! The following external containers will be purged:`)
7178
// print first 12 characters of ID and first configured name alias

docs/source/markdown/podman-system-reset.1.md

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ podman\-system\-reset - Reset storage back to initial state
88

99
## DESCRIPTION
1010
**podman system reset** removes all pods, containers, images, networks and volumes, and machines.
11+
It also removes the configured graphRoot and runRoot directories. Make sure these are not set to
12+
some important directory.
1113

1214
This command must be run **before** changing any of the following fields in the
1315
`containers.conf` or `storage.conf` files: `driver`, `static_dir`, `tmp_dir`
@@ -38,6 +40,8 @@ WARNING! This will remove:
3840
- all build cache
3941
- all machines
4042
- all volumes
43+
- the graphRoot directory: /var/lib/containers/storage
44+
- the runRoot directory: /run/containers/storage
4145
Are you sure you want to continue? [y/N] y
4246
```
4347

0 commit comments

Comments
 (0)