Docker Community Forums

Share and learn in the Docker community.

[solved] Why does system prune ask for user confirmation with y/n case sensitivity?

why the difference lower / uppercase letter in [y/N]?

docker system prune
WARNING! This will remove:
  - all stopped containers
  - all networks not used by at least one container
  - all dangling images
  - all dangling build cache

Are you sure you want to continue? [y/N]

User input is case insensitive here so there is no point in showing “No” in uppercase. Besides, the destructive option is “Yes” which, if anything, would have made more sense enforcing more strict input for confirmation.

Its to show you that if you just press enter it will default to No

1 Like