One line Debian or Ubuntu upgrade and clean up

This command:

apt-get update;apt-get upgrade -y;apt-get autoclean;apt-get autoremove;checkrestart


Note: the debian-goodies package needs to be installed to use the checkrestart command.

Linux allows running applications to be updated however they will not start to use the new files until restarted. The checkrestart command (from the Debian package description):

Help to find and restart processes which are using old versions of upgraded files (such as libraries)