Do services need to be restarted when updating packages
January 24, 2022
Package configuration: whether to restart the service
During the installation of package updates and their configuration, the apt program may ask you to restart the service:
There are services installed on your system which need to be restarted when certain libraries, such as libpam, libc, and libssl, are upgraded. Since these restarts may cause interruptions of service for the system, you will normally be prompted on each upgrade for the list of services you wish to restart. You can choose this option to avoid being prompted; instead, all necessary restarts will be done for you automatically so you can avoid being asked questions on each library upgrade. Restart services during package upgrades without asking?
This message can be confusing, especially the phrase “cause interruptions of service for the system”. In fact, the essence is quite simple – the binaries have been updated and you need to restart the services that use them so that they start using the updated versions of the files.
The name of the package that requires the service to be restarted is in the upper left corner, in the screenshot it is libc6, i.e. “GNU C Library: Shared libraries”. It contains the standard libraries that are used by nearly all programs on the system. This package includes shared versions of the standard C library and the standard math library, as well as many others.
What kind of interruptions can a service restart cause?
Examples of the consequences of restarting services:
- at the time of restarting the web server service, sites will be unavailable to users
- when restarting the caching proxy server, the cache stored in RAM will be deleted
- restarting network services can lead to connection drops (but in practice this does not always happen)
That is, the possible consequences of restarting services on the home computer are insignificant – you can safely restart.
As far as restarting services on a server, for example, restarting the SSH server usually doesn't break the connection. You need to evaluate the consequences of restarting other services based on your situation.
- Error “Failed to talk to init daemon” (SOLVED) (77.6%)
- What is the difference between “systemctl reboot” and “reboot” and “systemctl poweroff” and “poweroff” (77.6%)
- How to update the GRUB bootloader on Debian and derivative distributions (Kali Linux, Ubuntu, Linux Mint) (61.8%)
- Error “Cannot load modules/libphp7.so” (SOLVED) (57.8%)
- Chromium will no longer sync passwords - what should Linux users do? (57.8%)
- How to modify images on the Linux command line (RANDOM - 50%)