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.
Asked
Active
Viewed 2.9e+01k times
17
-
dupe http://askubuntu.com/questions/81585/what-is-dist-upgrade-and-why-does-it-upgrade-more-than-upgrade and http://askubuntu.com/questions/194651/why-use-apt-get-upgrade-instead-of-apt-get-dist-upgrade – bain May 07 '14 at 17:31
-
1@bain: It might be a dupe, but not of those, the answers are pretty much the same but not the sense of the question. – jobin May 07 '14 at 17:47
-
@Jobin how about http://askubuntu.com/questions/274557/update-manager-asking-me-to-update-kernel-but-apt-get-upgrade-does-not or http://askubuntu.com/questions/201706/how-can-i-make-apt-get-upgrade-the-kernel-similarly-to-aptitude – bain May 07 '14 at 18:13
-
@bain: They are still specific to one package(the kernel) and this is a general concern. I wouldn't flag it as a dupe of those. – jobin May 07 '14 at 18:24
-
@Jobin Is this question not also specific to the kernel.. " but when I check the update manager kernel updates are still there. Why is that ?" – bain May 07 '14 at 18:34
-
@bain: I guess they are, good catch. – jobin May 07 '14 at 18:38
-
@bain Why isn't this question the "dominant" question. You've marked it as a duplicate, yet this is the question I ran into trying to solve an unrelated, general problem...and the supposed "dominant" question it is a 'duplicate' of is a question I never would have reached in a million years. – Chris May 09 '16 at 14:13
-
@bordeo I didn't mark this question as a duplicate - I just suggested some possibilities and some editors marked it as a duplicate. In general duplicates should be to questions that are older, have more upvotes/views and better answers. At the time this was flagged as a duplicate (2 years ago) the other questions probably were considered better by those metrics. – bain May 12 '16 at 00:44
2 Answers
34
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.
7
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

Xweque
- 1,103