apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get autoclean
apt-get clean
apt-get autoremove
Use the command in turn mean
With the new software list
Software update
Software update
Clean up old versions of the software cache
Clear the cache
Clean up orphaned software useless