Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 2705  / 3 Years ago, fri, november 19, 2021, 7:46:50

If I run sudo apt-get upgrade then I get shown a list of packages and if any of these are services, they may need to be restarted (which is done automatically when installing the updates). How can I tell if one of these packages will require a restart of a service, for example if I update a package which is not named mysql* then I'd like to know before I install the updates that this might trigger a restart of the mysql service (if the package is named mysql* I'll assume a restart to service is required). Or does this never happen? If a restart of the mysql service is required, I'll remove that node from the load balancer pools and let all connections to it finish before installing the updates.



Just to clarify, I'm referring to restarting of services, not rebooting the whole machine.



Thanks for your help.


More From » apt

 Answers
4

Use the -s flag:



-s, --simulate, --just-print, --dry-run, --recon, --no-act
No action. Perform a simulation of events that would occur but do not actually change the system.


Just the output is printed, you can see if it would restart a service there.


[#24573] Saturday, November 20, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
enefiama

Total Points: 43
Total Questions: 125
Total Answers: 102

Location: Gabon
Member since Sat, Jul 25, 2020
4 Years ago
;