Thanks for the reply @JasonWalker but in my case patches are installed 3 days ago and system got restarted many times. But still that flag is not cleared.
I saw an option where we can put an exception for a particular flag but this will not serve our problem, because I may don’t even know every time which flag is not getting cleared.

Need to know some other option because this is happening for a multiple customers and they are using quiet latest version.
BigFix server version 9.5.7 and 9.5.3.

Thanks for reply @AlanM
We understand that but the question is why those entries were not cleared automatically after taking many reboots.
Because the problem here is we are patching the servers with specific down time and have to restart the server in that maintenance period only.

We are deploying baseline without post restart, and we will restart the server later which will come under “Restart Needed - Triggered by BES Action”.

We are 100% relying on task “Restart Needed - Triggered by BES Action” for restart.

But many servers are patched before maintenance period and owner has restarted the server but they are again showing relevant in “Restart Needed - Triggered by BES Action” because their registries are not getting cleared and those servers will get restart again.

In my case, we narrowed it down to Symantec Endpoint Protection still requiring an additional reboot because it was populating PendingFileRenameOperations even after a reboot.

Our “solution” so far is to set _BESClient_ActionManager_PendingRestartExclusions to ignore “Symantec” in the PendingFileRenameOperations registry key which causes the reboot to actually clear the pending restart flag.

Then we have a second restart task that checks if the servers are “not pending restart” but the PendingFileRenameOperations has the Symantec references.

The issue is that the system must have cleared the “reboot needed” stage for any BigFix marked pending restarts to be cleared. If the system restarts but any of those registry entries are populated, except by the exclusion entries, then no pending restart is cleared in BigFix as we don’t know what particular restart wasn’t cleared.

The OS and the installers are the only thing that clears those locations, not BigFix