apt update auto yes code example
Example 1: ubuntu apt-get update without input
sudo apt-get update && sudo apt-get -y upgrade
Example 2: Automatically answer 'Yes' when using apt-get install
apt-get -y install [packagename]
sudo apt-get update && sudo apt-get -y upgrade
apt-get -y install [packagename]