When is apt prompting for user confirmation and if it does so, when does it default to “yes”
up vote
1
down vote
favorite
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 rpm(dnf) and 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 -y, 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 debian and ubuntu repos should be enough.
Edit:
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.
Edit 2:
I realized not long after I accepted the answer, that I actually saw the [y/N] on yum-based systems.
apt
add a comment |
up vote
1
down vote
favorite
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 rpm(dnf) and 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 -y, 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 debian and ubuntu repos should be enough.
Edit:
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.
Edit 2:
I realized not long after I accepted the answer, that I actually saw the [y/N] on yum-based systems.
apt
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
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 rpm(dnf) and 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 -y, 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 debian and ubuntu repos should be enough.
Edit:
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.
Edit 2:
I realized not long after I accepted the answer, that I actually saw the [y/N] on yum-based systems.
apt
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 rpm(dnf) and 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 -y, 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 debian and ubuntu repos should be enough.
Edit:
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.
Edit 2:
I realized not long after I accepted the answer, that I actually saw the [y/N] on yum-based systems.
apt
apt
edited Nov 26 at 8:51
asked Jan 4 at 2:35
Weijun Zhou
1,459222
1,459222
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
apt-get upgrade will always prompt.
apt-get install will only install automatically if there are no conflicts, held packages and all of the new packages to be installed were explicitly specified. That is if it brings in dependencies automatically it will prompt.
So ifapt-get installprompts, when does it default to yes (i.e.[Y/n]) and when does it default to no (i.e.[y/N])?
– Weijun Zhou
Jan 4 at 3:01
It doesn't. Either it prompts or it doesn't prompt. If you're talking about where --assume-yes will fail thats a different question isn't it?
– jdwolf
Jan 4 at 3:06
I mean, "Do you want to continue? [Y/n]" vs. "Do you want to continue?[y/N]" I have seen both cases if I remember correctly.
– Weijun Zhou
Jan 4 at 3:12
That particular prompt will always be "Y/n" so if you press enter it assumes yes.
– jdwolf
Jan 4 at 3:27
Thank you. Then maybe I have some confusion here, with therpmsystem. I will mark the answer accepted.
– Weijun Zhou
Jan 4 at 3:30
|
show 3 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
apt-get upgrade will always prompt.
apt-get install will only install automatically if there are no conflicts, held packages and all of the new packages to be installed were explicitly specified. That is if it brings in dependencies automatically it will prompt.
So ifapt-get installprompts, when does it default to yes (i.e.[Y/n]) and when does it default to no (i.e.[y/N])?
– Weijun Zhou
Jan 4 at 3:01
It doesn't. Either it prompts or it doesn't prompt. If you're talking about where --assume-yes will fail thats a different question isn't it?
– jdwolf
Jan 4 at 3:06
I mean, "Do you want to continue? [Y/n]" vs. "Do you want to continue?[y/N]" I have seen both cases if I remember correctly.
– Weijun Zhou
Jan 4 at 3:12
That particular prompt will always be "Y/n" so if you press enter it assumes yes.
– jdwolf
Jan 4 at 3:27
Thank you. Then maybe I have some confusion here, with therpmsystem. I will mark the answer accepted.
– Weijun Zhou
Jan 4 at 3:30
|
show 3 more comments
up vote
2
down vote
accepted
apt-get upgrade will always prompt.
apt-get install will only install automatically if there are no conflicts, held packages and all of the new packages to be installed were explicitly specified. That is if it brings in dependencies automatically it will prompt.
So ifapt-get installprompts, when does it default to yes (i.e.[Y/n]) and when does it default to no (i.e.[y/N])?
– Weijun Zhou
Jan 4 at 3:01
It doesn't. Either it prompts or it doesn't prompt. If you're talking about where --assume-yes will fail thats a different question isn't it?
– jdwolf
Jan 4 at 3:06
I mean, "Do you want to continue? [Y/n]" vs. "Do you want to continue?[y/N]" I have seen both cases if I remember correctly.
– Weijun Zhou
Jan 4 at 3:12
That particular prompt will always be "Y/n" so if you press enter it assumes yes.
– jdwolf
Jan 4 at 3:27
Thank you. Then maybe I have some confusion here, with therpmsystem. I will mark the answer accepted.
– Weijun Zhou
Jan 4 at 3:30
|
show 3 more comments
up vote
2
down vote
accepted
up vote
2
down vote
accepted
apt-get upgrade will always prompt.
apt-get install will only install automatically if there are no conflicts, held packages and all of the new packages to be installed were explicitly specified. That is if it brings in dependencies automatically it will prompt.
apt-get upgrade will always prompt.
apt-get install will only install automatically if there are no conflicts, held packages and all of the new packages to be installed were explicitly specified. That is if it brings in dependencies automatically it will prompt.
answered Jan 4 at 2:57
jdwolf
2,610216
2,610216
So ifapt-get installprompts, when does it default to yes (i.e.[Y/n]) and when does it default to no (i.e.[y/N])?
– Weijun Zhou
Jan 4 at 3:01
It doesn't. Either it prompts or it doesn't prompt. If you're talking about where --assume-yes will fail thats a different question isn't it?
– jdwolf
Jan 4 at 3:06
I mean, "Do you want to continue? [Y/n]" vs. "Do you want to continue?[y/N]" I have seen both cases if I remember correctly.
– Weijun Zhou
Jan 4 at 3:12
That particular prompt will always be "Y/n" so if you press enter it assumes yes.
– jdwolf
Jan 4 at 3:27
Thank you. Then maybe I have some confusion here, with therpmsystem. I will mark the answer accepted.
– Weijun Zhou
Jan 4 at 3:30
|
show 3 more comments
So ifapt-get installprompts, when does it default to yes (i.e.[Y/n]) and when does it default to no (i.e.[y/N])?
– Weijun Zhou
Jan 4 at 3:01
It doesn't. Either it prompts or it doesn't prompt. If you're talking about where --assume-yes will fail thats a different question isn't it?
– jdwolf
Jan 4 at 3:06
I mean, "Do you want to continue? [Y/n]" vs. "Do you want to continue?[y/N]" I have seen both cases if I remember correctly.
– Weijun Zhou
Jan 4 at 3:12
That particular prompt will always be "Y/n" so if you press enter it assumes yes.
– jdwolf
Jan 4 at 3:27
Thank you. Then maybe I have some confusion here, with therpmsystem. I will mark the answer accepted.
– Weijun Zhou
Jan 4 at 3:30
So if
apt-get install prompts, when does it default to yes (i.e. [Y/n]) and when does it default to no (i.e. [y/N])?– Weijun Zhou
Jan 4 at 3:01
So if
apt-get install prompts, when does it default to yes (i.e. [Y/n]) and when does it default to no (i.e. [y/N])?– Weijun Zhou
Jan 4 at 3:01
It doesn't. Either it prompts or it doesn't prompt. If you're talking about where --assume-yes will fail thats a different question isn't it?
– jdwolf
Jan 4 at 3:06
It doesn't. Either it prompts or it doesn't prompt. If you're talking about where --assume-yes will fail thats a different question isn't it?
– jdwolf
Jan 4 at 3:06
I mean, "Do you want to continue? [Y/n]" vs. "Do you want to continue?[y/N]" I have seen both cases if I remember correctly.
– Weijun Zhou
Jan 4 at 3:12
I mean, "Do you want to continue? [Y/n]" vs. "Do you want to continue?[y/N]" I have seen both cases if I remember correctly.
– Weijun Zhou
Jan 4 at 3:12
That particular prompt will always be "Y/n" so if you press enter it assumes yes.
– jdwolf
Jan 4 at 3:27
That particular prompt will always be "Y/n" so if you press enter it assumes yes.
– jdwolf
Jan 4 at 3:27
Thank you. Then maybe I have some confusion here, with the
rpm system. I will mark the answer accepted.– Weijun Zhou
Jan 4 at 3:30
Thank you. Then maybe I have some confusion here, with the
rpm system. I will mark the answer accepted.– Weijun Zhou
Jan 4 at 3:30
|
show 3 more comments
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f414687%2fwhen-is-apt-prompting-for-user-confirmation-and-if-it-does-so-when-does-it-defa%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown