I have a lot of updates, but I just want to install the ones that don't need a system restart. How do I do this? The command-Line solution is preferred, but GUI is fine.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
All current versions of Ubuntu contain nice utility named
check which daemons need to be restarted after library upgrades
It registers itself to react on apt install or remove triggers.
Install it with:
sudo apt-get install needrestart
And it will inform you about needed restart after package installation.
Your question makes sense for somebody coming from the Windows way of operating...but Ubuntu does not work the same way: Most users do not need to distinguish between restart-required vs. other upgrades.
An immediate restart is never required by your Ubuntu system. You can install all upgrades now, and restart sometime in the future. This is obviously very different from how Windows Updates work.
Restarts are generally required only by kernel packages. If you choose not to restart, you will simply continue to keep using your current kernel.
Updated kernel packages are released every few weeks. Many folks have servers that run months between restarts. At the restart, the server boots into the newest kernel, skipping over many intermediate kernels that never run. The system automatically deletes older kernels afterward.
On occasion, a kernel upgrade will include important security patches. Unattended Upgrades will install these automatically, and without asking you first. However, the system still WON'T reboot into that new kernel. (There is a setting that permits Unattended Upgrades to reboot without asking...but it's OFF by default).
Advanced Service: You can reduce the number of restart-requiring updates by using Livepatch