Correctly place 'DEBIAN_FRONTEND=noninteractive' variable before commands requiring it.
Remove apt package index files.