You can do a couple of things for avoiding this. Setting the DEBIAN_FRONTEND variable to noninteractive and using -y flag. For example: export DEBIAN_FRONTEND=noninteractive apt-get -y install [packagename] If you need to install it via sudo, use: su…