Debian Linux is used in many different Linux OSs. For example, Ubuntu and Kali, are both based off of Debian Linux.
Error: The following packages were automatically installed and are no longer required:
Steps you can try:
SSH to your machine, type: sudo apt autoremove
If you are root, type: apt autoremove
Error: The following packages have been kept back:
There are two options that have worked for us, be careful with tip 2, it can be a nuclear option.
SSH
apt-get –with-new-pkgs upgrade
If this does not work a more aggressive action is: A more aggressive solution is to run sudo apt-get dist-upgrade, which will force the installation of those new dependencies.