export DEBIAN_FRONTEND and use sudo -E to keep env