On Ubuntu you can use something like this:

export DEBIAN_FRONTEND=noninteractive
sudo -E apt-get update

Which will prevent things that require input (choosing grub versions or conflicts between configuration files, or even prompting for a mysql root password during install)

I checked the man page for yum but didn't see anything related to non-interactive usage other than check-update which "Returns exit value of 100 if there are packages available for an update"

Does Yum have an equivalent to apt / aptitude's DEBIAN_FRONTEND=noninteractive ?

  • yum/rpm doesn't have an equivalent to debconf. It doesn't do things like prompt for a mysql password. – jordanm Aug 22 '13 at 22:00

By long-standing convention, RPMs themselves never ask for any interactive input. Batch mode is assumed. Some terrible vendor RPMs may attempt anyway, but since they're not supposed to do that, there's never been much call to have an external feature to work around the bad behavior — just avoid or fix those RPMs.

Sometimes yum itself asks for confirmation. For this, you can give -y to tell yum to assume "yes".


yum has the -y option. Adding this tells yum to assume "yes" as the answer to any question asked.

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.