57

Oftentimes I try to ‘beat’ the update manager by opening a console and entering the sequence

sudo apt-get update
sudo apt-get upgrade

which, to the best of my knowledge, should update all packages to their newest stable releases. The update manager does the same, as far as I know.

However, the update manager sometimes (most frequently when a new kernel is distributed) requires a restart after terminating. apt-get never does, even when it looks like I’m upgrading the kernel. Why is this so?


In response to the duplicate vote: I am not asking which packages require a reboot as the linked question is. Rather I am asking why apt-get does not ask me to reboot even when I recognise a package being updated that the update manager would require a reboot for.

Jan
  • 767

5 Answers5

82

Because apt-get (or plain simple apt) is for the pros and when the pros do a:

sudo apt-get dist-upgrade

and see a new kernel being installed, the pros know they have to reboot to activate it.

The automatic update is for everyone else out there!

Alternatively, you can now install Ubuntu Live kernel Patching from version 16.04 onwards which allows you to update your kernel while your server is running.

:-)

Fabby
  • 35,017
37

Update manager suggests to restart when kernels are upgraded or some other system packages with services that are marked for reboot when upgraded.

In this case /var/run/reboot-required is set by a package installation script.

Command line apt-get upgrade does not suggest anything, because it is targeted to more advanced users that can decide themselves when to restart the system ;-)

But after upgrade using apt-get Update Manager in a while will suggest to restart too.

Pilot6
  • 92,041
15

When you install a new kernel you have to restart the machine in order for the changes to take effect, apt-get just doesn't nag about it.

7

apt-get actually notifies you on terminal when after installing a certain package, if it requires to reboot.

update-manager is an all-in-one type of solution that takes care all of your upgrade needs by itself.

I do prefer apt-get though , don't know why :)

121n3
  • 75
  • 5
2

apt-get upgrade does not update the kernel.

apt-get dist-upgrade updates the kernel in Ubuntu.

Linux kernel versions before 4.1 need a reboot when the kernel is updated.

Other packages don't need a reboot, just a restart of the application itself. Some Windows applications running on Wine request a reboot but just type the command:

wineserver -k

and restart the application.

Fabby
  • 35,017
user222789
  • 21
  • 1