DELAPARRA
Index
Color
NL
Category: CLI flags

-y, --yes, --assume-yes (Auto-Yes)

Explained by Updated

What is -y, --yes, --assume-yes (Auto-Yes)?

-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.

Definition source Coders Lingo, CC BY 4.0

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.

At a glance

CategoryCLI flags
Explained by
Updated

More CLI flags terms

All terms starting with a number or symbol

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.