← Knowledge Base
Ubuntu ServerReference note1 min read · updated 2026-11-27

Do I need to reboot after updates

Detect a pending reboot and see which services still use old libraries.

rebootupdateskernel
[ -f /var/run/reboot-required ] && cat /var/run/reboot-required.pkgs
uname -r                              # running kernel
dpkg -l 'linux-image-*' | grep ^ii    # installed kernels
sudo needrestart                      # lists services using outdated libraries (apt install needrestart)
sudo checkrestart                     # similar on Debian (debian-goodies)

A new kernel only takes effect after a reboot. Library updates need the affected services restarted. Reboot at a quiet time and check afterwards: systemctl --failed and docker ps. Old kernels can be removed with sudo apt autoremove --purge.