If you encounter the following error say The following packages have been kept back. Then use any one of the below ways.
Way to solve 1:
sudo apt-get --with-new-pkgs upgrade
sudo apt-get install <list of all packages that are kept back>
sudo apt-get dist-upgrade