8

Could anyone clarify what does the sudo apt-get install -y <package> do? what exactly does the -y stand for?

1
  • 3
    Needless to say that using the -y option imposes the risk of not getting warnings to prevent something unwanted from happening.
    – Takkat
    Apr 21, 2017 at 13:28

1 Answer 1

11

It stands for yes, so will answer yes to any questions that the apt-get command will generate.

You can find out the options of commands by viewing their manual page with the man command. In the output of man apt-get you can find the following section:

-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.  
2
  • 1
    I beat you to it, Arronical by 25 seconds. The question is a dupe.
    – karel
    Apr 21, 2017 at 13:20
  • Aaah! Must've been while I was writing! I'll get flagging.
    – Arronical
    Apr 21, 2017 at 13:22

Not the answer you're looking for? Browse other questions tagged .