ubuntu@xenial:~$ systemctl reboot
Operation inhibited by "APT" (PID 1311 "apt", user root), reason is "APT is installing or removing packages".
Please retry operation after closing inhibitors and logging out other users.
Alternatively, ignore inhibitors and users with 'systemctl reboot -i'.
Verified fix for Xenial:
ubuntu@xenial:~$ systemctl reboot
Operation inhibited by "APT" (PID 1311 "apt", user root), reason is "APT is installing or removing packages".
Please retry operation after closing inhibitors and logging out other users.
Alternatively, ignore inhibitors and users with 'systemctl reboot -i'.
ubuntu@xenial:~$ dpkg -l | grep apt
ii apt 1.2.32 amd64 commandline package manager