My usual command for keeping the machine up to date is rather verbose, and it can result in more than one password prompt if any command takes a long time:
sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove && sudo apt-get autoclean
I'd like to shorten this down to one command (preferably without using a global alias).
Solution based on @amra's answer and another tip:
sudo sh -c 'apt-get update && apt-get upgrade --yes && if [ -f /var/run/reboot-required ]; then echo You should reboot; fi'
Try
sudo sh -c "apt-get -y update;apt-get -y dist-upgrade;apt-get -y autoremove;apt-get -y autoclean"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With