I think this is missing -y --no-install-recommends at least.  Possibly yes '' | sudo DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install ... if we want it to be completely automatic.