-2

I have seen commands like this:

sudo apt-get upgrade -y 

I would like to know the meaning of the -y flag and a reference for Linux command line flags in general.

1
  • 2
    Have you tried man apt-get (ie. ask your system to show you the reference MANual page for apt-get)
    – guiverc
    Oct 4, 2019 at 3:19

1 Answer 1

2

Try man apt-get to see what's available.

man will show you the manual reference page for the command that follows it, and what options are available for that command for your release.

It'll tell you

   -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 an unauthenticated package or removing an essential package occurs
       then apt-get will abort. Configuration Item: APT::Get::Assume-Yes.

(as this was done a 19.10 box; your page may be different, but will perfectly match your release of Ubuntu)

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