mirror of
https://github.com/containers/podman.git
synced 2025-10-20 20:54:45 +08:00
Merge pull request #19876 from vrothberg/reset-backport-v4.4
[v4.4] system reset: show graphRoot/runRoot before removal
This commit is contained in:
@ -65,6 +65,13 @@ func reset(cmd *cobra.Command, args []string) {
|
|||||||
- all machines
|
- all machines
|
||||||
- all volumes`)
|
- all volumes`)
|
||||||
|
|
||||||
|
info, _ := registry.ContainerEngine().Info(registry.Context())
|
||||||
|
// lets not hard fail in case of an error
|
||||||
|
if info != nil {
|
||||||
|
fmt.Printf(" - the graphRoot directory: %q\n", info.Store.GraphRoot)
|
||||||
|
fmt.Printf(" - the runRoot directory: %q\n", info.Store.RunRoot)
|
||||||
|
}
|
||||||
|
|
||||||
if len(listCtn) > 0 {
|
if len(listCtn) > 0 {
|
||||||
fmt.Println(`WARNING! The following external containers will be purged:`)
|
fmt.Println(`WARNING! The following external containers will be purged:`)
|
||||||
// print first 12 characters of ID and first configured name alias
|
// print first 12 characters of ID and first configured name alias
|
||||||
|
@ -8,6 +8,8 @@ podman\-system\-reset - Reset storage back to initial state
|
|||||||
|
|
||||||
## DESCRIPTION
|
## DESCRIPTION
|
||||||
**podman system reset** removes all pods, containers, images, networks and volumes, and machines.
|
**podman system reset** removes all pods, containers, images, networks and volumes, and machines.
|
||||||
|
It also removes the configured graphRoot and runRoot directories. Make sure these are not set to
|
||||||
|
some important directory.
|
||||||
|
|
||||||
This command must be run **before** changing any of the following fields in the
|
This command must be run **before** changing any of the following fields in the
|
||||||
`containers.conf` or `storage.conf` files: `driver`, `static_dir`, `tmp_dir`
|
`containers.conf` or `storage.conf` files: `driver`, `static_dir`, `tmp_dir`
|
||||||
@ -38,6 +40,8 @@ WARNING! This will remove:
|
|||||||
- all build cache
|
- all build cache
|
||||||
- all machines
|
- all machines
|
||||||
- all volumes
|
- all volumes
|
||||||
|
- the graphRoot directory: /var/lib/containers/storage
|
||||||
|
- the runRoot directory: /run/containers/storage
|
||||||
Are you sure you want to continue? [y/N] y
|
Are you sure you want to continue? [y/N] y
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user