Update the system from terminal [duplicate]
I want to update my Ubuntu 14.04 system from the terminal and I know that sudo apt-get update && sudo apt-get upgrade
are the commands but when I check the update manager kernel updates are still there. Why is that ? and what can I do to update the kernel from terminal.
Solution 1:
You need to perform dist-upgrade
inorder to install/remove all dependencies related to the packages upgraded using upgrade
. From the manual page of apt-get:
dist-upgrade dist-upgrade in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages; apt-get has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary. The dist-upgrade command may therefore remove some packages. The /etc/apt/sources.list file contains a list of locations from which to retrieve desired package files. See also apt_preferences(5) for a mechanism for overriding the general settings for individual packages.
So, the better way of upgrading would be:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
However, be careful while using dist-upgrade
as it might also remove packages to satisfy dependencies.
Solution 2:
apt-get upgrade won't install new software or remove software, something you must when installing a new kernel... See the thread.
A thing you can do (taken from this thread, read full for more):
Use aptitude:
sudo aptitude update
sudo aptitude safe-upgrade
sudo aptitude full-upgrade
You could also use sudo apt-get dist-upgrade
instead of sudo apt-get upgrade