`needrestart` changes in Ubuntu 24.04: service restarts

It is indeed important in production server environments to have control over the timing of service restarts for updates.

However, the correct layer at which to manage this is to control when the updates are installed, not to change the behavior of the system to not restart services on package update.

Without needrestart, package updates will already restart services and therefore the installation of package updates should be done during a maintenance window. The only difference with needrestart is that we are now more correctly restarting services affected by a security update to a library, whereas without needrestart we are not doing so; and as a result we can now provide better assertions to users about the security state of their running system and whether a system restart is required.

So just as there is no supported way to blanket disable the restart of services from package maintainer scripts on upgrade, there should be no supported way to blanket disable the restart of services by needrestart.

1 Like