8

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

muru
  • 197,895
  • 55
  • 485
  • 740
Sirdyn
  • 91
  • 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 '17 at 13:28

1 Answers1

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.  
Arronical
  • 19,893