4

I have a software installed on my computer and it hasn't been running for quite some time. I saw a potential solution to be a simple update. I'm new to the command line and would like to know what this option for sudo will do:

sudo apt-get update -y

sudo apt-get install -y yourprogramhere

I checked man sudo,man apt,man get,man install, and man update.

I looked for -y documentation, and couldn't find it.

defarm
  • 55

1 Answers1

7

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

It is however not mentioned in man apt for this reason:

apt provides a high-level commandline interface for the package management system. It is intended as an end user interface and enables some options better suited for interactive usage by default compared to more specialized APT tools like apt-get(8) and apt-cache(8).

Much like apt itself, its manpage is intended as an end user interface and as such only mentions the most used commands and options partly to not duplicate information in multiple places and partly to avoid overwhelming readers with a cornucopia of options and details.

Raffa
  • 32,237