Is -y redundant in apt-get update?

I'm often using apt-get install -y which works great.

Recently I saw a pull request where someone wanted to update apt-get update with apt-get update -y.

In my experience apt-get update doesn't prompt the user.

Is this pull request redundant or are there prompt messages that can occur in apt-get update?

5

1 Answer

Yes, the -y option together with update is totally redundant, yet accepted due to the many powers apt and apt-get have.

To make that clear, apt-get would accept any valid global option that makes sense with the command. If you pass it anything else it would complain. (Thanks to @Braiam for pointing this out)

On a personal note, I frown on tutorials giving the advice to run an option like upgrade and so on with the -y option, because it removes a layer of reconsideration for the user. Yet it has its purpose for scripting tasks and might then mostly go along with -qq which quiets all output.

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like