jesseduffield / jesseduffield/lazydocker
Changes in default behavior for pruning volumes
- Dominant language
- Go
- Stars
- 52.8k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
The default behavior for pruning Docker volumes by running `docker volume prune` is to only remove anonymous volumes which are not used by at least one container.
In order to also prune named volumes, one has to explicitly use the `-a` (`--a`) option like this `docker volume prune -a`.
Lazydocker seems to be using the latter, more aggressive, option which easily causes data loss since it prunes both anonymous and named volumes.

Would it be possible to default volume pruning to work the way how Docker does it by default, where only unused anonymous volumes are removed and maybe add another option which removes both anonymous and named ones?
Something like this:
- prune unused volumes
- prune all unused volumes
The main reason why I am suggesting this is because the ambiguity of the description `prune unused volumes` might lead users to assume that that lazydocker does what Docker does by default, while what's actually going to happen is almost guaranteed to be a data loss due to said ambiguity.
Contributor guide
Assessment
This issue has not been assessed yet.