System Restart Required

*** System Restart Required *** – Automated Linux Kernel Patches

Last updated on

You keep seeing this message *** System Restart Required *** when you log in to Linux. In this article we will see what updates have triggered this message and how to apply them.

This message indicates the presence of the file /var/run/reboot-required. Ubuntu packages can trigger the creation of this file in their post-installation script postinst.

A restart is usually required when an update to the Linux kernel has been installed. These are often security patches that only come into effect after reboot.

The file /var/run/reboot-required.pkgs lists the packages that requested the reboot. To view this file:

cat /var/run/reboot-required.pkgs

You should see a list of packages awaiting reboot:

linux-image-4.4.0-92-generic
linux-base

Above we can see there is a Linux kernel security update linux-image-4.4.0-92-generic and linux-base, which requires a system restart.

To reboot, run:

sudo reboot

You typically don’t need to restart right away, but you’ll be vulnerable to any security problems fixed in the new kernel until you do.

Another way to to find out what packages have been recently installed is to run:

zgrep -h 'status installed' /var/log/dpkg.log* | sort | tail -n 100

This will show you the last 100 packages installed. Important updates to the Linux kernel typically begin with linux-image-.

/var/log/dpkg.log
2017-08-23 06:55:31 status installed linux-headers-generic:amd64 4.4.0.92.97
2017-08-23 06:55:31 status installed linux-headers-virtual:amd64 4.4.0.92.97
2017-08-23 06:55:31 status installed linux-image-4.4.0-92-generic:amd64 4.4.0-92.115
2017-08-23 06:55:31 status installed linux-image-virtual:amd64 4.4.0.92.97
2017-08-23 06:55:31 status installed linux-virtual:amd64 4.4.0.92.97

If you just want to get rid of the ***System Restart Required*** message without restarting, you can remove the reboot flag file.

sudo rm /var/run/reboot-required
1 Star2 Stars3 Stars4 Stars5 Stars 4.90 (29 votes)

Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie.

p.s. I increased my AdSense revenue by 68% using AI 🤖. Read my Ezoic review to find out how.

16 replies

avatar
  Subscribe  
newest oldest
Notify of
Sharma Jayprakash
Guest
Sharma Jayprakash
Sharma Jayprakash
1 year ago

that’s a lot

Víc
Guest
Víc
Víc
1 year ago

After restarting the system I get the following error: `Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-1039-aws x86_64)

Failed to connect to https://changelogs.ubuntu.com/meta-release-lts. Check your Internet connection or proxy settings

How could I solve it?

Denilson
Guest
Denilson
Denilson
1 year ago

Obrigado! Me ajudou muito

Curtis Maurand
Guest
Curtis Maurand
Curtis Maurand
1 year ago

Actually had a server restart automatically after patching. Not good. I want the server to reboot when I want it to, not when ubuntu thinks it should. Really, Really bad form

natalie
Guest
natalie
natalie
1 year ago

Many thanks.

Axel Werner
Guest
Axel Werner
Axel Werner
2 years ago

Very nice detailed article!!! THANKS!

Mikel
Guest
Mikel
Mikel
2 years ago

If the update-notifier-common is installed, Ubuntu will alert you about pending updates via the message of the day (motd) upon console or remote login.

Nick
Guest
Nick
Nick
3 years ago

After performing sudo reboot I got a 502 bad gateway message on my site…

Adam L
Guest
Adam L
Adam L
3 years ago

How exactly does a package trigger this message after install?

Corbin Jaylin
Guest
Corbin Jaylin
Corbin Jaylin
3 years ago

After I restart I still get “packages can be updated” message?