What does -y mean in apt-get -y install command?











up vote
71
down vote

favorite
9












I always see commands like this



apt-get -y install 


What is the -y tag for and what is the difference between apt-get install with and without the -y tag?










share|improve this question
























  • the Manual is at linux.die.net/man/8/apt-get
    – ilansch
    Oct 31 '16 at 15:25















up vote
71
down vote

favorite
9












I always see commands like this



apt-get -y install 


What is the -y tag for and what is the difference between apt-get install with and without the -y tag?










share|improve this question
























  • the Manual is at linux.die.net/man/8/apt-get
    – ilansch
    Oct 31 '16 at 15:25













up vote
71
down vote

favorite
9









up vote
71
down vote

favorite
9






9





I always see commands like this



apt-get -y install 


What is the -y tag for and what is the difference between apt-get install with and without the -y tag?










share|improve this question















I always see commands like this



apt-get -y install 


What is the -y tag for and what is the difference between apt-get install with and without the -y tag?







apt






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 11 '15 at 12:04









muru

134k19282482




134k19282482










asked Sep 11 '15 at 11:42









abdelrahman khaled

461145




461145












  • the Manual is at linux.die.net/man/8/apt-get
    – ilansch
    Oct 31 '16 at 15:25


















  • the Manual is at linux.die.net/man/8/apt-get
    – ilansch
    Oct 31 '16 at 15:25
















the Manual is at linux.die.net/man/8/apt-get
– ilansch
Oct 31 '16 at 15:25




the Manual is at linux.die.net/man/8/apt-get
– ilansch
Oct 31 '16 at 15:25










1 Answer
1






active

oldest

votes

















up vote
86
down vote



accepted










From the results of running man apt-get



-y, --yes, --assume-yes
Automatic yes to prompts; assume "yes" as answer to all prompts and
run non-interactively. If an undesirable situation, such as
changing a held package, trying to install a unauthenticated
package or removing an essential package occurs then apt-get will
abort. Configuration Item: APT::Get::Assume-Yes.


If you run an apt-get command without the -y option, you need to answer to all prompts that you get from that command interactively in order for the execution of the command to continue.






share|improve this answer























  • perfect answer =) +1
    – A.B.
    Sep 11 '15 at 11:58






  • 2




    Also note that this is a common switch in utilities that have confirmation prompts in their functionality. While it's convenient in the shell, the real purpose is for automating scripts.
    – user1359
    Sep 11 '15 at 14:51






  • 2




    I wouldn't go as far as calling -y "common". The feature is fairly common in system administration tools (of which apt-get is one) but the method varies. When in doubt, always refer to the man page for the command in question for what parameter to use and what effect it has.
    – a CVn
    Sep 11 '15 at 15:39








  • 2




    One side effect of using -y is that it will skip downgrades, whereas if the user entered y, it would perform the downgrades. So if you want -y to execute the same thing as a user entering y, you also need to add --allow-downgrades.
    – wisbucky
    Mar 24 at 0:00






  • 1




    I don't know why @wisbucky 's comment doesn't have more upvotes. Very important to know, thanks
    – frank
    Jun 27 at 21:59













Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f672892%2fwhat-does-y-mean-in-apt-get-y-install-command%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
86
down vote



accepted










From the results of running man apt-get



-y, --yes, --assume-yes
Automatic yes to prompts; assume "yes" as answer to all prompts and
run non-interactively. If an undesirable situation, such as
changing a held package, trying to install a unauthenticated
package or removing an essential package occurs then apt-get will
abort. Configuration Item: APT::Get::Assume-Yes.


If you run an apt-get command without the -y option, you need to answer to all prompts that you get from that command interactively in order for the execution of the command to continue.






share|improve this answer























  • perfect answer =) +1
    – A.B.
    Sep 11 '15 at 11:58






  • 2




    Also note that this is a common switch in utilities that have confirmation prompts in their functionality. While it's convenient in the shell, the real purpose is for automating scripts.
    – user1359
    Sep 11 '15 at 14:51






  • 2




    I wouldn't go as far as calling -y "common". The feature is fairly common in system administration tools (of which apt-get is one) but the method varies. When in doubt, always refer to the man page for the command in question for what parameter to use and what effect it has.
    – a CVn
    Sep 11 '15 at 15:39








  • 2




    One side effect of using -y is that it will skip downgrades, whereas if the user entered y, it would perform the downgrades. So if you want -y to execute the same thing as a user entering y, you also need to add --allow-downgrades.
    – wisbucky
    Mar 24 at 0:00






  • 1




    I don't know why @wisbucky 's comment doesn't have more upvotes. Very important to know, thanks
    – frank
    Jun 27 at 21:59

















up vote
86
down vote



accepted










From the results of running man apt-get



-y, --yes, --assume-yes
Automatic yes to prompts; assume "yes" as answer to all prompts and
run non-interactively. If an undesirable situation, such as
changing a held package, trying to install a unauthenticated
package or removing an essential package occurs then apt-get will
abort. Configuration Item: APT::Get::Assume-Yes.


If you run an apt-get command without the -y option, you need to answer to all prompts that you get from that command interactively in order for the execution of the command to continue.






share|improve this answer























  • perfect answer =) +1
    – A.B.
    Sep 11 '15 at 11:58






  • 2




    Also note that this is a common switch in utilities that have confirmation prompts in their functionality. While it's convenient in the shell, the real purpose is for automating scripts.
    – user1359
    Sep 11 '15 at 14:51






  • 2




    I wouldn't go as far as calling -y "common". The feature is fairly common in system administration tools (of which apt-get is one) but the method varies. When in doubt, always refer to the man page for the command in question for what parameter to use and what effect it has.
    – a CVn
    Sep 11 '15 at 15:39








  • 2




    One side effect of using -y is that it will skip downgrades, whereas if the user entered y, it would perform the downgrades. So if you want -y to execute the same thing as a user entering y, you also need to add --allow-downgrades.
    – wisbucky
    Mar 24 at 0:00






  • 1




    I don't know why @wisbucky 's comment doesn't have more upvotes. Very important to know, thanks
    – frank
    Jun 27 at 21:59















up vote
86
down vote



accepted







up vote
86
down vote



accepted






From the results of running man apt-get



-y, --yes, --assume-yes
Automatic yes to prompts; assume "yes" as answer to all prompts and
run non-interactively. If an undesirable situation, such as
changing a held package, trying to install a unauthenticated
package or removing an essential package occurs then apt-get will
abort. Configuration Item: APT::Get::Assume-Yes.


If you run an apt-get command without the -y option, you need to answer to all prompts that you get from that command interactively in order for the execution of the command to continue.






share|improve this answer














From the results of running man apt-get



-y, --yes, --assume-yes
Automatic yes to prompts; assume "yes" as answer to all prompts and
run non-interactively. If an undesirable situation, such as
changing a held package, trying to install a unauthenticated
package or removing an essential package occurs then apt-get will
abort. Configuration Item: APT::Get::Assume-Yes.


If you run an apt-get command without the -y option, you need to answer to all prompts that you get from that command interactively in order for the execution of the command to continue.







share|improve this answer














share|improve this answer



share|improve this answer








edited Sep 11 '15 at 11:50

























answered Sep 11 '15 at 11:44









karel

54.9k11120138




54.9k11120138












  • perfect answer =) +1
    – A.B.
    Sep 11 '15 at 11:58






  • 2




    Also note that this is a common switch in utilities that have confirmation prompts in their functionality. While it's convenient in the shell, the real purpose is for automating scripts.
    – user1359
    Sep 11 '15 at 14:51






  • 2




    I wouldn't go as far as calling -y "common". The feature is fairly common in system administration tools (of which apt-get is one) but the method varies. When in doubt, always refer to the man page for the command in question for what parameter to use and what effect it has.
    – a CVn
    Sep 11 '15 at 15:39








  • 2




    One side effect of using -y is that it will skip downgrades, whereas if the user entered y, it would perform the downgrades. So if you want -y to execute the same thing as a user entering y, you also need to add --allow-downgrades.
    – wisbucky
    Mar 24 at 0:00






  • 1




    I don't know why @wisbucky 's comment doesn't have more upvotes. Very important to know, thanks
    – frank
    Jun 27 at 21:59




















  • perfect answer =) +1
    – A.B.
    Sep 11 '15 at 11:58






  • 2




    Also note that this is a common switch in utilities that have confirmation prompts in their functionality. While it's convenient in the shell, the real purpose is for automating scripts.
    – user1359
    Sep 11 '15 at 14:51






  • 2




    I wouldn't go as far as calling -y "common". The feature is fairly common in system administration tools (of which apt-get is one) but the method varies. When in doubt, always refer to the man page for the command in question for what parameter to use and what effect it has.
    – a CVn
    Sep 11 '15 at 15:39








  • 2




    One side effect of using -y is that it will skip downgrades, whereas if the user entered y, it would perform the downgrades. So if you want -y to execute the same thing as a user entering y, you also need to add --allow-downgrades.
    – wisbucky
    Mar 24 at 0:00






  • 1




    I don't know why @wisbucky 's comment doesn't have more upvotes. Very important to know, thanks
    – frank
    Jun 27 at 21:59


















perfect answer =) +1
– A.B.
Sep 11 '15 at 11:58




perfect answer =) +1
– A.B.
Sep 11 '15 at 11:58




2




2




Also note that this is a common switch in utilities that have confirmation prompts in their functionality. While it's convenient in the shell, the real purpose is for automating scripts.
– user1359
Sep 11 '15 at 14:51




Also note that this is a common switch in utilities that have confirmation prompts in their functionality. While it's convenient in the shell, the real purpose is for automating scripts.
– user1359
Sep 11 '15 at 14:51




2




2




I wouldn't go as far as calling -y "common". The feature is fairly common in system administration tools (of which apt-get is one) but the method varies. When in doubt, always refer to the man page for the command in question for what parameter to use and what effect it has.
– a CVn
Sep 11 '15 at 15:39






I wouldn't go as far as calling -y "common". The feature is fairly common in system administration tools (of which apt-get is one) but the method varies. When in doubt, always refer to the man page for the command in question for what parameter to use and what effect it has.
– a CVn
Sep 11 '15 at 15:39






2




2




One side effect of using -y is that it will skip downgrades, whereas if the user entered y, it would perform the downgrades. So if you want -y to execute the same thing as a user entering y, you also need to add --allow-downgrades.
– wisbucky
Mar 24 at 0:00




One side effect of using -y is that it will skip downgrades, whereas if the user entered y, it would perform the downgrades. So if you want -y to execute the same thing as a user entering y, you also need to add --allow-downgrades.
– wisbucky
Mar 24 at 0:00




1




1




I don't know why @wisbucky 's comment doesn't have more upvotes. Very important to know, thanks
– frank
Jun 27 at 21:59






I don't know why @wisbucky 's comment doesn't have more upvotes. Very important to know, thanks
– frank
Jun 27 at 21:59




















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f672892%2fwhat-does-y-mean-in-apt-get-y-install-command%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

How did Captain America manage to do this?

迪纳利

南乌拉尔铁路局