This article will guide you on why you should not set the DEBIAN_FRONTEND value to noninteractive is a 'cosmetic' change. If you really need to change its setting, make sure to change it back to its default value afterward. Simply prepending an apt command with DEBIAN_FRONTEND=something does not persist after the single command to which it is applied.
apt-get update downloads the package lists from the repositories and "updates" them to get information on the newest versions of packages and their dependencies.
It will do this for all repositories and PPAs.
To Preserve Configuration Files:
During package installation or upgrade, Debian may wish to prompt the user on overwriting a configuration file.
This preference can be appended to the installation command:
apt-get install -q -y \
-o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" \
This command will instruct the installer to quiet any messages, assume yes, and then upgrade configuration files if no changes are present in the new package.