Debian: Fixing “The following packages have been kept back”

Normally, when you run the sudo apt update and sudo apt upgrade commands all the packages are updated.

But sometimes if the dependencies of an installed package have been changed such that it requires installation of new packages, the installed package won’t be upgraded automatically and you’ll see package kept back error.

To solve it is very simple: just type the following.

sudo apt-get --with-new-pkgs upgrade