-y, --yes, --assume-yes (Auto-Yes): Automatically answer "yes" to all confirmation prompts. Used in scripts where you can't respond interactively. -y or --yes answers yes to every confirmation question in advance. apt-get install -y installs without asking. npx --yes downloads a package without the prompt. Many installers and cleanup tools have a similar option. It exists for automation. A Dockerfile or a CI job has nobody to type y, and without the flag the build would wait until it times out.
Frequently asked questions about -y, --yes, --assume-yes (Auto-Yes)
What should you keep in mind with -y, --yes, --assume-yes (Auto-Yes)?
The risk is that you also skip the moment where the tool tells you what it is about to do. On your own machine, read the prompt at least once before you automate it. A package manager may be about to remove other packages to make room, and -y will agree to that too. In scripts, combine it with a pinned version, so the thing you are saying yes to does not change without you noticing.
Use before running or suggesting shell commands with flags, especially destructive or broad ones (-f/--force, -r/-R recursive, -a/--all, -y/--yes, prune, --hard), and when a user asks what a flag means (-v, -q, -n/--dry-run, -h, -o, -p, -t, -u, -w, -x, -c, -i). Explains flags per tool and prefers dry runs and narrow scopes.
Use this skill before running, or recommending, any Docker command that deletes, wipes, resets, or otherwise irreversibly changes state — even if the user just says to "clean up", "clear the cache", "start fresh", "wipe everything", "nuke it", "reset", "force remove", or "tear down" Docker resources. Covers generic Docker CLI destructive operations not owned by a more specific skill — `docker rm`,
Master ShellCheck static analysis configuration and usage for shell script quality. Use when setting up linting infrastructure, fixing code issues, or ensuring script portability.