TL/DR: I think the accepted answer is a complete one to my expectation. Other answers that add useful info to the topic are still welcome.
I have used both
apt package management systems. In
rpm systems I notice when I update or install new packages it almost always prompts the user for confirmation and the default is "no" most of the time. In the
apt system I notice that sometimes it does not prompt for the user confirmation and sometimes prompts the user with a default "yes".
So my question is, when does
apt-get or things alike prompt the user for confirmation, and if it does so, when does it defaults to yes?
I think I should be able to find the answer if I dig through the source of
apt but I have failed to do it, probably because I haven't used the right tool or the right method for processing the source code.
Note that I am not asking for
apt-get --assume-no or things alike. I know these options and I am not asking for someone to tell me that they exist. I am asking the behavior when no additional command line flags are provided. It may depend on command line options when compiling, but answering the behavior for the
apt shipped in the default
ubuntu repos should be enough.
I know there is Apt-get install does not ask for confirmation on LinuxQuestions.org, but I have always thought that there are cases where the prompt of
apt-get defaults to no (i.e.
[y/N]), and I want evidence from the source.
From the accepted answer, it is clear that
If the prompt is in the form
Do you want to continue? [Y/n]
It always defaults to yes.
From the comment in the accepted answer I finally found evidence from the source code that I have been looking for: https://github.com/Debian/apt/search?utf8=%E2%9C%93&q=YnPrompt
So I think I have found a complete answer to my question.
I realized not long after I accepted the answer, that I actually saw the