I'd like to know if apk add is capable of automatically assuming yes to any prompts when installing a new package on Alpine Linux?

I'm familiar with running something like apt-get install -y curl on Ubuntu and wondering if there's an equivalent command for my use case.


I haven't tried it as I could not find a package prompting me, but either yes | apk add <package> (for multiple prompts) or echo y | apk add <package> (in case there is only one prompt) should work.

For details see https://linux.die.net/man/1/yes

  • That's an interesting approach. Thanks for sharing. – Peter J Langley Nov 22 '19 at 8:39

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.