When is apt prompting for user confirmation and if it does so, when does it default to âyesâ
Clash Royale CLAN TAG#URR8PPP
up vote
0
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.
Any help will be appreciated. It is also OK if you can shed some light on some advice for me to interpret the source code myself.
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. So I posted my question anyway.
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. Other answers that add more information to the topic are still welcome.
apt
add a comment |Â
up vote
0
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.
Any help will be appreciated. It is also OK if you can shed some light on some advice for me to interpret the source code myself.
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. So I posted my question anyway.
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. Other answers that add more information to the topic are still welcome.
apt
add a comment |Â
up vote
0
down vote
favorite
up vote
0
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.
Any help will be appreciated. It is also OK if you can shed some light on some advice for me to interpret the source code myself.
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. So I posted my question anyway.
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. Other answers that add more information to the topic are still welcome.
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.
Any help will be appreciated. It is also OK if you can shed some light on some advice for me to interpret the source code myself.
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. So I posted my question anyway.
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. Other answers that add more information to the topic are still welcome.
apt
edited Jan 4 at 4:57
asked Jan 4 at 2:35
Weijun Zhou
1,434119
1,434119
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
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 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
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 therpm
system. 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
1
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 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
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 therpm
system. I will mark the answer accepted.
â Weijun Zhou
Jan 4 at 3:30
 |Â
show 3 more comments
up vote
1
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 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
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 therpm
system. I will mark the answer accepted.
â Weijun Zhou
Jan 4 at 3:30
 |Â
show 3 more comments
up vote
1
down vote
accepted
up vote
1
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,392116
2,392116
So ifapt-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
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 therpm
system. I will mark the answer accepted.
â Weijun Zhou
Jan 4 at 3:30
 |Â
show 3 more comments
So ifapt-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
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 therpm
system. 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
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
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
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
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
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