The following commands require super user access. If you're not currently logged in as root, you may need to run the following command:
$ sudo su
To update the server, including security updates:
# apt-get update
To upgrade installed packages to the latest version:
# apt-get upgrade
During this upgrade process, you may see that some packages are not upgraded. These packages are part of the Linux distribution, and are upgraded separately:
# apt-get dist-upgrade
After you run these commands, you can free up disk space by deleting old packages with these two commands:
# apt-get autoremove
# apt-get autoclean
If you want to upgrade your version of Ubuntu/Debian to the latest generally available release, you can do so with the following command:
# do-release-upgrade
After updating the server, a reboot may be necessary for the changes to take effect:
# reboot