3

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.

  • The weirdest thing just happened... the program started up. I'm still interested in an answer to the question, though. – defarm Mar 6 at 20:17
  • -y will answer yes so you will not be prompted and asked to confirm installation of updates or packages – Raffa Mar 6 at 20:17
  • So why didn't you look in man apt-get? – mook765 Mar 6 at 20:19
  • Not there in my studies yet! Thanks! – defarm Mar 6 at 20:19
  • Seems... dangerous. – defarm Mar 6 at 20:20
6

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.