Take the 2-minute tour ×

I have unattended-upgrade set up on my Ubuntu systems. Occasionally I will log in remotely to one of them and I'll see a message informing me that I need to reboot the system (in order to complete an upgrade). Is there a way to determine the specific package (or set of packages) which is triggering this notice?

share|improve this question

3 Answers 3

up vote 42 down vote accepted

Short version:

cat /var/run/reboot-required.pkgs


Looks like there is an easy way to automatically extract the requested information.

Inside .deb files there are control files for installation, including postinst (run after installation).

For example, in linux-image-2.6.35-25-generic_2.6.35-25.44_amd64.deb,
postinst includes

my $notifier          = "/usr/share/update-notifier/notify-reboot-required";

my $warn_reboot     = 'Yes';     # Warn that we are installing a version of
                                 # the kernel we are running


# Warn of a reboot
if (-x $notifier) {

The shell script /usr/share/update-notifier/notify-reboot-required updates
/var/run/reboot-required and /var/run/reboot-required.pkgs.

The latter file contains a list of packages requesting a reboot.

share|improve this answer

Reboot is recommended by the unattended-upgrades when it sees that a /var/run/reboot-required exists. The file is created by postinst (post-installation) scripts in some packages, it looks something like this:

[ -x /usr/share/update-notifier/notify-reboot-required ] && \
/usr/share/update-notifier/notify-reboot-required || true

If you want to see which packages triggered this, you can have a look at the contents of the /var/run/reboot-required.pkgs file.

For more info also see this thread.

share|improve this answer

I don't really know if there are other packages that require rebooting, but kernel updates always do. I'd say almost every time I've been "asked" to reboot, the kernel had been updated.

share|improve this answer
That's not good enough in my opinion. Bootloader updates also request rebooting, as well as init (upstart). –  Olli Mar 1 '11 at 8:59
Well, also some other packages, like DBus: ubuntu.com/usn/USN-799-1 . So compiling list of packages that require restart (DBus do not always require that) is foolish for complete solution. –  Olli Mar 1 '11 at 9:01
You're right... Mine is a partial knowledge :(. Thanks for the information. I hadn't realized other packages require restart, too. –  luri Mar 1 '11 at 11:19

Your Answer


