Should I reboot Debian server after apt-get upgrade?

Posted on January 2, 2019 at 7:17 pm

If you ran “apt-get upgrade” you don’t always need to reboot the Debian server. To know if you need to reboot the server after “apt-get upgrade”, check if this file is present (it is generally of 0 bytes, so it is an empty file):


Here is an example on my Debian server:

-rw-r--r--  1 root     root        0 Jan  2 20:02 reboot-required

If that file is present, you should reboot the server, example:

shutdown -r now

Command to automatically reboot if “reboot_required” is present:

test -f /var/run/reboot-required && echo "Rebooting the server..." && shutdown -r now

Updated on November 6, 2020 at 9:30 pm

Receive updates via email

Other Posts

Updated Posts