docker / docker/cli

Require confirmation when removing (deleting) volumes

Open
#1,437 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

kind/feature
Dominant language
Go
Stars
6.1k
Forks
2.2k
Avg merge
1d 15h
Merged PRs (30d)
43

Description

Right now, it's a bit too easy to remove volumes in Docker. I can remove a volume via the command below and it requires no further interaction from the user:

docker volume rm myvolume

I propose that the default behavior be altered in such a way that requires the user to explicitly indicate that they want removal to be done silently without prompt:

docker volume rm -f myvolume

And the original behavior is changed to prompt the user:

$ docker volume rm myvolume
This will permanently delete volume 'myvolume'. Are you sure? [y/n] y
Volume deleted

Above, at the prompt, the user had to type y followed by pressing ENTER to confirm the selection.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Docker CLI entry point for docker volume rm and trace its option parsing and removal flow. Compare the current command behavior with the proposed confirmation prompt and -f bypass; done means the default command confirms before deletion while the explicit force form remains silent.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.