ubuntu@apt-cosmic:~$ systemctl reboot
Operation inhibited by "APT" (PID 683 "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 for 1.7.5 in cosmic:
ubuntu@ apt-cosmic: ~$ systemctl reboot
Operation inhibited by "APT" (PID 683 "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'.