# Have Reboot Required wait until all updates have finished

**URL:** <https://forum.virtualmin.com/t/have-reboot-required-wait-until-all-updates-have-finished/138173>\
**Category:** Webmin\
**Created:** [October 17, 2026, 1:54am UTC](https://forum.virtualmin.com/t/have-reboot-required-wait-until-all-updates-have-finished/138173 "2026-10-17T01:54:24Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Randomz](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/r/839c29/32.png) [@Randomz](https://forum.virtualmin.com/u/Randomz)\
**Post date:** [October 17, 2026, 1:54am UTC](https://forum.virtualmin.com/t/have-reboot-required-wait-until-all-updates-have-finished/138173/1 "2026-10-17T01:54:24Z")

</div>

| SYSTEM INFORMATION | |
| --- | --- |
| OS type and version | EL 10 |
| Webmin version | 2.670 |

When there are a bunch of updates to be done, as soon as the kernel update is done Webmin alerts that System requires Reboot though there may still be a lot of updates still happening.  
This can either fool the Admin into rebooting, and does fool the Reboot Required system monitor into rebooting.

End result corruption due to half installed update - in my case systemd had to be forced re-installed.

Suggest don’t set Reboot Required until after all current (security) updates are finished.

---

<div class="post-metadata">

**Author:** ![jimdunn](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jimdunn/32/3487_2.png) [@jimdunn](https://forum.virtualmin.com/u/jimdunn)\
**Post date:** [October 17, 2026, 3:46am UTC](https://forum.virtualmin.com/t/have-reboot-required-wait-until-all-updates-have-finished/138173/2 "2026-10-17T03:46:01Z")

</div>

I didn’t realize this, but I always use the terminal for updates so I wouldn’t.

But it reminded me of how Windows Server will show the “Reboot Now” button before updates are completely installed.

---

<div class="post-metadata">

**Author:** ![Joe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/joe/32/9_2.png) [@Joe](https://forum.virtualmin.com/u/Joe)\
**Post date:** [October 17, 2026, 6:04am UTC](https://forum.virtualmin.com/t/have-reboot-required-wait-until-all-updates-have-finished/138173/3 "2026-10-17T06:04:21Z")

</div>

We don’t set reboot required, so we can’t control when it gets set. That’s handled by the OS package manager.

I don’t know how best to handle that race risk, but I do know it’s almost never urgent that you reboot as soon as it is set. It is only set when a kernel update is installed, and it’s only actually a necessary reboot if there is a security issue that effects your system. In all other cases, a reboot can happen whenever is convenient/safe. I wouldn’t automate it, personally, but you could make your monitor wait an hour or whatever before rebooting to avoid the race.

---

<div class="post-metadata">

**Author:** ![shoulders](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/shoulders/32/10086_2.png) [@shoulders](https://forum.virtualmin.com/u/shoulders)\
**Post date:** [October 17, 2026, 6:41am UTC](https://forum.virtualmin.com/t/have-reboot-required-wait-until-all-updates-have-finished/138173/4 "2026-10-17T06:41:06Z")

</div>

Is there a monitor or command that can probe to see if all updates have been applied.

---

<div class="post-metadata">

**Author:** ![Joe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/joe/32/9_2.png) [@Joe](https://forum.virtualmin.com/u/Joe)\
**Post date:** [October 17, 2026, 7:51am UTC](https://forum.virtualmin.com/t/have-reboot-required-wait-until-all-updates-have-finished/138173/5 "2026-10-17T07:51:31Z")

</div>

No, though you could create one (you can create your own monitors to do literally anything), but that would be subject to a race, too.

I don’t know any way to completely avoid a race here. You could check to see if apt/dpkg or dnf/rpm are running, and if so, wait a few minutes and try again.

---

<div class="post-metadata">

**Author:** ![jimr1](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jimr1/32/14173_2.png) [@jimr1](https://forum.virtualmin.com/u/jimr1)\
**Post date:** [October 17, 2026, 7:51am UTC](https://forum.virtualmin.com/t/have-reboot-required-wait-until-all-updates-have-finished/138173/6 "2026-10-17T07:51:51Z")

</div>

if you really want to do it here’s a starting point  
bash

```auto
OUTPUT="$(apt-get --assume-no upgrade | tail -n 1)" 
if [[$OUTPUT == 0*]] ;
then
echo All upgraded
# reboot here perhaps
exit 1
fi
# at this point there are still upgrades
echo There are upgrades to do

```

php

```auto
<?php
$cmd = "apt-get --assume-no upgrade";
exec($cmd,$output,$ret);
$last = end($output);
if( str_starts_with($last, "0 ")){
echo "ALL upgraded\n";
// 
}
else {
// there are upgrades to do
}

```

note this applies if your using apt but could be changed to other package managers, and it really is just an example

---

<div class="post-metadata">

**Author:** ![shoulders](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/shoulders/32/10086_2.png) [@shoulders](https://forum.virtualmin.com/u/shoulders)\
**Post date:** [October 17, 2026, 8:54am UTC](https://forum.virtualmin.com/t/have-reboot-required-wait-until-all-updates-have-finished/138173/7 "2026-10-17T08:54:07Z")

</div>

Are your scripts detecting if apt is still running?

[https://askubuntu.com/questions/896117/how-can-i-tell-when-updates-installations-are-done-if-i-started-them-in-the-gui](https://askubuntu.com/questions/896117/how-can-i-tell-when-updates-installations-are-done-if-i-started-them-in-the-gui)

---

<div class="post-metadata">

**Author:** ![jimr1](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jimr1/32/14173_2.png) [@jimr1](https://forum.virtualmin.com/u/jimr1)\
**Post date:** [October 17, 2026, 9:15am UTC](https://forum.virtualmin.com/t/have-reboot-required-wait-until-all-updates-have-finished/138173/8 "2026-10-17T09:15:05Z")

</div>

as I said this is a starter & not fully polished scripts  
bash

```auto
if [[$(ps -e | grep apt-get)]]; then
    echo "apt-get is running"
    exit 0
fi
OUTPUT="$(apt-get --assume-no upgrade | tail -n 1)" 
prefix="0 "
if [[$OUTPUT == "$prefix"*]] ;
then
echo All upgraded
# reboot here perhaps
exit 1
fi
# at this point there are still upgrades
echo There are upgrades to do

```

php

```auto
<?php
$check = trim(shell_exec("ps -e | grep apt-get"));
if (!empty($check)){
echo "apt-get is running\n";
exit;
}
$cmd = "apt-get --assume-no upgrade";

exec($cmd,$output,$ret);
$last = end($output);
if( str_starts_with($last, "0 ")){
echo "ALL upgraded\n";
// 
}
else {
// there are upgrades to do
}

```

as I said in my previous post, these are starter scripts for someone else to improve on

---

<div class="post-metadata">

**Author:** ![shoulders](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/shoulders/32/10086_2.png) [@shoulders](https://forum.virtualmin.com/u/shoulders)\
**Post date:** [October 17, 2026, 9:26am UTC](https://forum.virtualmin.com/t/have-reboot-required-wait-until-all-updates-have-finished/138173/9 "2026-10-17T09:26:15Z")

</div>

It was not a critism, it was a genuine question.
