Cancel an errored out remove orphans task?

Problem: I have a four month old “remove orphans” task stuck in a stopped state from when I had an issue with using Ubuntu repos (this is the post I reported that issue in Remove orphan tasks failing on Katello 4.9 - #4 by senetm) and it’s causing a bunch of “Check for long running tasks” tasks to error out as well. Is there any way to force cancel this one task?

Expected outcome: Hoping there’s a way to cancel this one task so that I can resume the rest of the errored out tasks.

Foreman and Proxy versions: 3.7.1

Foreman and Proxy plugin versions:

Distribution and version: Rocky Linux 8.9

Other relevant data:

I think I managed to fix this using the following command:

foreman-rake foreman_tasks:cleanup TASK_SEARCH='label = Actions::Katello::OrphanCleanup::RemoveOrphans' STATES='stopped'

It gave me this output:

About to remove 108 tasks matching filter
Deleted 108 tasks matching filter
No orphaned task locks found, skipping.
No orphaned task links found, skipping.
About to remove 10 orphaned execution plans
Deleted 10 orphaned execution plans
No orphaned job invocations found, skipping.

and now the job is gone from the GUI and I was able to run all of the stuck jobs successfully.