Yay: Question: How can I install packages without having to confirm?

Created on 25 Sep 2019  路  3Comments  路  Source: Jguer/yay

Issue

When you run

yay packagename

You are prompted 4 times:

  • To select the right package (OK)
  • To cleanbuild
  • To see the diff
  • To ask you if you REALLY want to install it.

My question is

There is some way to auto confirm all questions? (except the first one maybe). In yaourt there was a way to do it.

Because I have to install 25 AUR packages quite often and I don't want to respond 100 questions every time. Thank you.

Most helpful comment

I would highly recommend reading the man page with man yay, as all the answers to your questions can be found there.

yay packagename will do a search and give you a list of matching packages. To avoid the first prompt if you know the exact package name, use -S, like yay -S packagename.

To avoid the second and third prompts, you can set the config options to give defaults and never prompt. See the current config with yay -Yg (https://github.com/Jguer/yay/blob/master/doc/yay.8#L105)

You can set answers with yay --save --answerX: https://github.com/Jguer/yay/blob/master/doc/yay.8#L225-L246
for example: yay --save --answerclean All --answerdiff All

and set the menu display options similarly: https://github.com/Jguer/yay/blob/master/doc/yay.8#L265-L311
for example: yay --save --nocleanmenu --nodiffmenu

I'll leave the rest an an exercise to the reader. Remember, man is your friend!

All 3 comments

I would highly recommend reading the man page with man yay, as all the answers to your questions can be found there.

yay packagename will do a search and give you a list of matching packages. To avoid the first prompt if you know the exact package name, use -S, like yay -S packagename.

To avoid the second and third prompts, you can set the config options to give defaults and never prompt. See the current config with yay -Yg (https://github.com/Jguer/yay/blob/master/doc/yay.8#L105)

You can set answers with yay --save --answerX: https://github.com/Jguer/yay/blob/master/doc/yay.8#L225-L246
for example: yay --save --answerclean All --answerdiff All

and set the menu display options similarly: https://github.com/Jguer/yay/blob/master/doc/yay.8#L265-L311
for example: yay --save --nocleanmenu --nodiffmenu

I'll leave the rest an an exercise to the reader. Remember, man is your friend!

That answer my question, thank you!

So close out the issue :P

Was this page helpful?
0 / 5 - 0 ratings

Related issues

x70b1 picture x70b1  路  4Comments

tapir picture tapir  路  3Comments

GhostKraft picture GhostKraft  路  4Comments

torvic9 picture torvic9  路  4Comments

GermanG picture GermanG  路  4Comments